View source: R/ec_rarefaction.R
ec_rarefaction | R Documentation |
Compute a rarefaction curve based on a presence-absence matrix.
ec_rarefaction(x, nrep = 100)
x |
presence absence matrix (sites as rows and species as columns). |
nrep |
number of replicates. |
A matrix with rarefaction replicates as rows.
Gotelli, N. J., and Robert K. C.. Quantifying Biodiversity: Procedures and Pitfalls in the Measurement and Comparison of Species Richness. Ecology Letters (2001).
mat <- ec_generate_pa(20, 10, .4)
res <- ec_rarefaction(mat, 1000)
plot(apply(res, 1, mean))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.