data(paracou16)
# Keep only 20% of points to run this example
X <- rthin(paracou16, 0.2)
plot(X)
# Calculate K
r <- 0:30
ActualValues.X <- D.r(X, r, "V. Americana", "Q. Rosea", Intertype = TRUE)
# Calculate confidence envelope (should be 1000 simulations, reduced to 20 to save time)
NumberOfSimulations <- 20
Alpha <- .05
LocalEnvelope.X <- DEnvelope(NumberOfSimulations, Alpha, X, r,
"V. Americana", "Q. Rosea", Intertype = TRUE)
# Plot
PlotResults(r, DivideByPiR2(ActualValues.X, r), lapply(LocalEnvelope.X, DivideByPiR2, r),
ylab="D / (pi R^2)", ReferenceValue=0)
Run the code above in your browser using DataLab