| diversity | R Documentation |
Compute Hill diversity from proportional abundances.
diversity(p, alpha = 2)
p |
Numeric vector or matrix of proportional abundances. If vector, then Hill diversity is computed for the vector of proportions (and a scalar is returned). If matrix, then Hill diversity is computed independently for each record (and a vector is returned). |
alpha |
Numeric scalar or vector. Continuous positive alpha parameter of the Hill diversity formula. If scalar, then |
Calculates Hill diversity from proportional abundances as defined in Hill (1973), which provides a unifying theory for ecological diversity indices. When alpha = 0, Hill diversity is equal to species richness. When alpha = 1, Hill diversity is equal to the exponentiated Shannon's entropy. When alpha = 2 (the default), Hill diversity is equal to the inverse of Simpson's index. For any value of alpha, the Hill diversity of a community with uniform proportional abundances is equal to species richness. Hill diversity represents the effective number of species.
Numeric scalar or vector of Hill diversity values.
Hill MO. 1973. Diversity and evenness: A unifying notation and its consequences. Ecology, 54(2): 427-432. DOI: 10.2307/1934352
dissimilarity for computing Bray-Curtis dissimilarity from proportional abundances.
richness for computing species richness from occupancy probabilities.
# Compute Hill diversity.
diversity(p=c(0.15,0.25,0.4,0.2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.