Compute a rarefaction curve based on a presence-absence matrix.
Arguments
- x
presence absence matrix (sites as rows and species as columns).
- nrep
number of replicates.
References
Gotelli, N. J., and Robert K. C.. Quantifying Biodiversity: Procedures and Pitfalls in the Measurement and Comparison of Species Richness. Ecology Letters (2001).
Examples
mat <- ec_generate_pa(20, 10, .4)
res <- ec_rarefaction(mat, 1000)
plot(apply(res, 1, mean))