Skip to contents

Computes an evenness measure.

Usage

evenness(object, ...)

# S4 method for class 'matrix'
evenness(
  object,
  ...,
  method = c("shannon", "simpson", "brillouin", "mcintosh")
)

# S4 method for class 'data.frame'
evenness(
  object,
  ...,
  method = c("shannon", "simpson", "brillouin", "mcintosh")
)

Arguments

object

A \(m \times p\) numeric matrix or data.frame of count data (absolute frequencies giving the number of individuals for each category, i.e. a contingency table). A data.frame will be coerced to a numeric matrix via data.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 EvennessIndex object.

Details

Evenness is a measure of how evenly individuals are distributed across the sample.

The following evenness measures are available (see Magurran 1988 for details):

brillouin

Brillouin diversity index.

mcintosh

McIntosh dominance index.

shannon

Shannon-Wiener diversity index.

simpson

Simpson dominance index.

References

Magurran, A. E. (1988). Ecological Diversity and its Measurement. Princeton, NJ: Princeton University Press. doi:10.1007/978-94-015-7358-0 .

Author

N. Frerebeau

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