library(boot)
library(spatial)
data(cav)
par(pty="s",mfrow=c(2,2)) # square panels for plots
plot(cav,pch=16)
ppregion(xl=0,xu=500,yl=0,yu=500)
plot(Kfn(cav, fs=100), type="s", xlab="Distance", ylab="L(r)",
      panel.first=abline(0,1,col="grey"))


sim <- cav
sim$x <- 500*runif(138)
sim$y <- 500*runif(138)
plot(sim,pch=16)
plot(Kfn(sim, fs=100), type="s", xlab="Distance", ylab="L(r)",
      panel.first=abline(0,1,col="grey"))
