calcDiversity {alakazam} | R Documentation |
Calculate the diversity index
Description
calcDiversity
calculates the clonal diversity index for a vector of diversity
orders.
Usage
calcDiversity(p, q)
Arguments
p |
numeric vector of clone (species) counts or proportions. |
q |
numeric vector of diversity orders. |
Details
This method, proposed by Hill (Hill, 1973), quantifies diversity as a smooth function
() of a single parameter
. Special cases of the generalized diversity
index correspond to the most popular diversity measures in ecology: species richness
(
), the exponential of the Shannon-Weiner index (
approaches
), the
inverse of the Simpson index (
), and the reciprocal abundance of the largest
clone (
approaches
). At
different clones weight equally,
regardless of their size. As the parameter
increase from
to
the diversity index (
) depends less on rare clones and more on common (abundant)
ones, thus encompassing a range of definitions that can be visualized as a single curve.
Values of are valid, but are generally not meaningful. The value of
at
is estimated by
at
.
Value
A vector of diversity scores for each
.
References
Hill M. Diversity and evenness: a unifying notation and its consequences. Ecology. 1973 54(2):427-32.
See Also
Used by alphaDiversity.
Examples
# May define p as clonal member counts
p <- c(1, 1, 3, 10)
q <- c(0, 1, 2)
calcDiversity(p, q)
# Or proportional abundance
p <- c(1/15, 1/15, 1/5, 2/3)
calcDiversity(p, q)