inddiv | R Documentation |
Generic function for calculating individual-level diversity.
inddiv(data, qs) ## S4 method for signature 'powermean' inddiv(data, qs) ## S4 method for signature 'relativeentropy' inddiv(data, qs) ## S4 method for signature 'metacommunity' inddiv(data, qs)
data |
|
qs |
|
data
may be input as three different classes:
power_mean
: calculates raw and normalised subcommunity alpha, rho
or gamma diversity by taking the powermean of diversity components
relativeentropy
: calculates raw or normalised subcommunity beta
diversity by taking the relative entropy of diversity components
metacommunity
: calculates all subcommunity measures of diversity
inddiv()
returns a standard output of class rdiv
Reeve, R., T. Leinster, C. Cobbold, J. Thompson, N. Brummitt, S. Mitchell, and L. Matthews. 2016. How to partition diversity. arXiv 1404.6520v3:1–9.
subdiv
for subcommunity-level diversity and
metadiv
for metacommunity-level diversity.
# Define metacommunity pop <- cbind.data.frame(A = c(1,1), B = c(2,0), C = c(3,1)) row.names(pop) <- paste0("sp", 1:2) pop <- pop/sum(pop) meta <- metacommunity(pop) # Calculate subcommunity gamma diversity (takes the power mean) g <- raw_gamma(meta) inddiv(g, 0:2) # Calculate subcommunity beta diversity (takes the relative entropy) b <- raw_beta(meta) inddiv(b, 0:2) # Calculate all measures of individual diversity inddiv(meta, 0:2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.