ec_rarefaction: Compute a rarefaction curve

View source: R/ec_rarefaction.R

ec_rarefactionR Documentation

Compute a rarefaction curve

Description

Compute a rarefaction curve based on a presence-absence matrix.

Usage

ec_rarefaction(x, nrep = 100)

Arguments

x

presence absence matrix (sites as rows and species as columns).

nrep

number of replicates.

Value

A matrix with rarefaction replicates as rows.

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))

KevCaz/ecoocc documentation built on May 24, 2023, 1:43 p.m.