data(paracou16)
# Keep only 50% of points to run this example
X <- rthin(paracou16, 0.5)
plot(X)
# Calculate g
r <- 0:40
ActualValues.X <- g.r(X, r, "Q. Rosea", "V. Americana")
# Calculate confidence envelope (should be 1000 simulations, reduced to 4 to save time)
NumberOfSimulations <- 4
Alpha <- .10
LocalEnvelope.X <- gEnvelope(NumberOfSimulations, Alpha, X, r,
"Q. Rosea", "V. Americana", SimulationType="RandomLabeling")
# Plot
PlotResults(r, ActualValues.X, LocalEnvelope.X, ylab="g", ReferenceValue=1)
Run the code above in your browser using DataLab