alpha.div: Functions for calculating alpha diversity.

View source: R/alpha.div.r

alpha.divR Documentation

Functions for calculating alpha diversity.

Description

Alpha diversity quantifies richness and evenness within a sampling unit (replicate).

The function alpha.div runs Simp.index or SW.index to calculate Simpson's, Inverse Simpson's or Shannon-Weiner diversities.

Simpson's index has a straightforward interpretation. It is the probability of reaching into a plot and simultaneously pulling out two different species. Inverse Simpson's diversity is equivalent to one over 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-Leibler 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.

Author(s)

Ken Aho

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.

Examples

data(cliff.sp)
alpha.div(cliff.sp,"simp")

asbio documentation built on May 29, 2024, 5:57 a.m.