metadiv: Metacommunity-level diversity

metadivR Documentation

Metacommunity-level diversity

Description

Generic function for calculating metacommunity-level diversity.

Usage

metadiv(data, qs)

## S4 method for signature 'powermean'
metadiv(data, qs)

## S4 method for signature 'relativeentropy'
metadiv(data, qs)

## S4 method for signature 'metacommunity'
metadiv(data, qs)

Arguments

data

matrix of mode numeric; containing diversity components

qs

vector of mode numeric containing q values

Details

data may be input as one of three different classes:

  • powermean: raw or normalised metacommunity alpha, rho or gamma diversity components; will calculate metacommunity-level raw or normalised metacommunity alpha, rho or gamma diversity

  • relativeentropy: raw or normalised metacommunity beta diversity components; will calculate metacommunity-level raw or normalised metacommunity beta diversity

  • metacommunity: will calculate all metacommunity measures of diversity

Value

metadiv() returns a standard output of class rdiv

References

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.

See Also

inddiv for type-level diversity and subdiv for subcommunity-level diversity.

Examples

# Define metacommunity
pop <- data.frame(a = c(1,3), b = c(1,1))
pop <- pop / sum(pop)
meta <- metacommunity(pop)

# Calculate metacommunity gamma diversity (takes the power mean)
g <- raw_gamma(meta)
metadiv(g, 0:2)

# Calculate metacommunity beta diversity (takes the relative entropy)
b <- raw_beta(meta)
metadiv(b, 0:2)

# Calculate all measures of metacommunity diversity
metadiv(meta, 0:2)


boydorr/RDiversity documentation built on May 6, 2022, 10:55 a.m.