| subdiv | R Documentation |
Generic function for calculating subcommunity-level diversity.
subdiv(data, qs) ## S4 method for signature 'powermean' subdiv(data, qs) ## S4 method for signature 'relativeentropy' subdiv(data, qs) ## S4 method for signature 'metacommunity' subdiv(data, qs)
data |
|
qs |
|
data may be input as one of three different classes:
powermean: raw or normalised metacommunity alpha, rho or gamma
diversity components; will calculate subcommunity-level raw or normalised
metacommunity alpha, rho or gamma diversity
relativeentropy: raw or normalised metacommunity beta
diversity components; will calculate subcommunity-level raw or normalised
metacommunity beta diversity
metacommunity: will calculate all subcommunity measures of
diversity
subdiv() 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.
inddiv for type-level diversity and
metadiv for metacommunity-level diversity.
# Define metacommunity
pop <- data.frame(a = c(1,3), b = c(1,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)
subdiv(g, 0:2)
# Calculate subcommunity beta diversity (takes the relative entropy)
b <- raw_beta(meta)
subdiv(b, 0:2)
# Calculate all measures of subcommunity diversity
subdiv(meta, 0:2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.