Computes an heterogeneity or a dominance index.
Usage
heterogeneity(object, ...)
# S4 method for class 'matrix'
heterogeneity(
object,
...,
method = c("shannon", "simpson", "berger", "boone", "brillouin", "mcintosh")
)
# S4 method for class 'data.frame'
heterogeneity(
object,
...,
method = c("shannon", "simpson", "berger", "boone", "brillouin", "mcintosh")
)
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()
.- ...
Further arguments to be passed to internal methods (see below).
- method
A
character
string specifying the index to be computed (see details). Any unambiguous substring can be given.
Value
An HeterogeneityIndex object.
Details
The following heterogeneity index are available (see Magurran 1988 for details):
berger
boone
brillouin
mcintosh
shannon
simpson
The berger
, mcintosh
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 .
See also
index_berger()
, index_boone()
, index_brillouin()
,
index_mcintosh()
, index_shannon()
, index_simpson()
Other diversity measures:
diversity()
,
evenness()
,
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