Computes multiple alpha diversity indices.
Usage
diversity(object, ...)
# S4 method for class 'matrix'
diversity(object, ..., evenness = FALSE, unbiased = FALSE)
# S4 method for class 'data.frame'
diversity(object, ..., evenness = FALSE, unbiased = FALSE)
Arguments
- object
A \(m \times p\)
numeric
matrix
ordata.frame
of count data (absolute frequencies giving the number of individuals for each category, i.e. a contingency table). Adata.frame
will be coerced to anumeric
matrix
viadata.matrix()
.- ...
Currently not used.
- evenness
A
logical
scalar: should an evenness measure be computed instead of an heterogeneity/dominance index? Only available forshannon
,simpson
andbrillouin
indices.- unbiased
A
logical
scalar: should the bias-corrected estimator be used? Only available forshannon
,simpson
andchao1
indices.
Value
A data.frame
with the following columns:
size
Sample size.
observed
Number of observed taxa/types.
shannon
brillouin
simpson
berger
menhinick
margalef
chao1
ace
squares
Details
Alpha diversity refers to diversity at the local level, assessed within a delimited system. It is the diversity within a uniform habitat of fixed size.
Diversity measurement assumes that all individuals in a specific taxa are equivalent and that all types are equally different from each other (Peet 1974). A measure of diversity can be achieved by using indices built on the relative abundance of taxa. These indices (sometimes referred to as non-parametric indices) benefit from not making assumptions about the underlying distribution of taxa abundance: they only take relative abundances of the species that are present and species richness into account. Peet (1974) refers to them as indices of heterogeneity.
Diversity indices focus on one aspect of the taxa abundance and emphasize either richness (weighting towards uncommon taxa) or dominance (weighting towards abundant taxa; Magurran 1988).
Evenness is a measure of how evenly individuals are distributed across the sample.
Note
The berger
and simpson
methods return a dominance index, not the
reciprocal or inverse form usually adopted, so that an increase in the value
of the index accompanies a decrease in diversity.
References
Magurran, A. E. (1988). Ecological Diversity and its Measurement. Princeton, NJ: Princeton University Press. doi:10.1007/978-94-015-7358-0 .
Peet, R. K. (1974). The Measurement of Species Diversity. Annual Review of Ecology and Systematics, 5(1), 285-307. doi:10.1146/annurev.es.05.110174.001441 .
See also
Other diversity measures:
evenness()
,
heterogeneity()
,
occurrence()
,
plot.DiversityIndex()
,
plot.RarefactionIndex()
,
profiles()
,
rarefaction()
,
richness()
,
she()
,
similarity()
,
simulate()
,
turnover()
Examples
## Data from Conkey 1980, Kintigh 1989
data("cantabria")
## Alpha diversity
diversity(cantabria)
#> size observed shannon brillouin simpson berger
#> Altamira 152 38 3.269200 2.927046 0.04934211 0.09868421
#> Cueto de la Mina 69 27 2.955298 2.495839 0.07162361 0.17391304
#> El Juyo 53 19 2.491683 2.086441 0.11854753 0.22641509
#> El Cierro 35 15 2.485604 2.011085 0.10204082 0.20000000
#> La Paloma 23 12 2.329187 1.799103 0.11153119 0.17391304
#> menhinick margalef chao1 ace squares
#> Altamira 3.082207 7.364825 58.98602 48.27865 46.52101
#> Cueto de la Mina 3.250418 6.140611 40.87923 42.71952 40.06780
#> El Juyo 2.609851 4.533672 31.26415 39.99480 31.71478
#> El Cierro 2.535463 3.937730 18.49714 20.77674 18.96476
#> La Paloma 2.502173 3.508219 17.73913 17.49418 16.64770
## Shannon diversity index
(h <- heterogeneity(cantabria, method = "shannon"))
#> [1] 3.269200 2.955298 2.491683 2.485604 2.329187
(e <- evenness(cantabria, method = "shannon"))
#> [1] 0.8987278 0.8966760 0.8462335 0.9178574 0.9373336
as.data.frame(h)
#> size observed singleton doubleton index
#> Altamira 152 38 13 4 3.269200
#> Cueto de la Mina 69 27 13 6 2.955298
#> El Juyo 53 19 10 4 2.491683
#> El Cierro 35 15 6 5 2.485604
#> La Paloma 23 12 6 3 2.329187