Calculates true beta diversity rarefied to given number of samples.
Community matrix (or data frame) for which rarified beta diversity is calculated.
Number of sites for which rarefied true beta should be calculated.
Logical; should the result be conditioned on the provided dataset (
Estimator of gamma diversity used to estimate number of species in the community (in case that
The function returns list with the following items:
sites: number of sites for which rarefaction is calculated;
gamma: estimated number of species (gamma diversity) for given number of
gamma.sd: standard deviation of
alpha: mean number of species per sample (alpha diversity);
beta: true beta diversity, calculated as
gamma / alpha;
beta.sd: standard deviation of true beta diversity, calculated as
gamma.sd / alpha (perhaps wrongand better not to use, needs proof!);
David Zeleny (email@example.com). Heavily builds on the code from function
specaccum in package
vegan written by Roeland Kindt and Jari Oksanen to construct sample-based rarefaction curves.
1 2 3 4 5 6 7 8
sc <- sample.comm (simul.comm (totS = 100), Np= 100) beta.raref (comm = sc$a.mat, sites = 10) # True beta diversity calculated on pair of samples (minus one) # is very close to mean pairwise Sorensen: beta.raref (comm = sc$a.mat, sites = 2)$beta-1 library (vegan) mean (vegdist (decostand (sc$a.mat, 'pa')))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.