data(paracou16)
# Keep only 20% of points to run this example
X <- rthin(paracou16, 0.2)
plot(X)
# Calculate Kmm
r <- seq(0, 30, 2)
ActualValues.X <- Kmm.r(X, r)
# Calculate confidence envelope (should be 1000 simulations, reduced to 10 to save time)
NumberOfSimulations <- 10
Alpha <- .10
LocalEnvelope.X <- KmmEnvelope(NumberOfSimulations, Alpha, X, r)
# Plot
PlotResults(r, DivideByPiR2(ActualValues.X, r), lapply(LocalEnvelope.X, DivideByPiR2, r),
ylab="Kmm / (pi R^2)", ReferenceValue=1)
Run the code above in your browser using DataLab