Learn R Programming

asbio (version 0.3-42)

alpha.div: Functions for calculating alpha diversity.

Description

The function alpha.div runs Simp.index or SW.index to calculate Simpson's, Inverse Simpson's or Shannon-Weiner diversities. Alpha diversity quantifies richness and evenness within a sampling unit (replicate). Simpson's index has a straightforward interpretation. It is the probability of reaching into a plot and simultaneously pulling out two different species. The inverse Simpson's diversity is equivalent to the probability that two randomly chosen individuals will be the same species. These measures have been attributed to Simpson (1949). While it does not allow straightforward interpretation of results, the Shannon-Weiner diversity (H') is another commonly used alpha-diversity measure based on the Kullback-Liebler information criterion (Macarthur and Macarthur 1961).

Usage

alpha.div(x,index)
Simp.index(x,inv)
SW.index(x)

Arguments

x
A vector or matrix of species abundances (e.g. counts). The functions assume that species are in columns and sites are in rows.
index
The type of alpha diversity to be computed. The function currently has three choices. simp = Simpson's diversity, inv.simp=inverse Simpson's, shan = Shannon-Weiner diversity.
inv
Logical, indicating whether or not Simpson's inverse diversity should be computed.

Value

  • A single diversity value is returned if x is a vector. A vector of diversities (one for each site) are returned if x is a matrix.

References

Simpson, E. H. (1949) Measurement of diversity. Nature. 163: 688. MacArthur, R. H., and MacArthur J. W. (1961) On bird species diversity. Ecology. 42: 594-598.

See Also

beta.div

Examples

Run this code
library(vegan)
data(varespec)
alpha.div(varespec,"simp")

Run the code above in your browser using DataLab