Learn R Programming

DiversitySampler (version 2.1)

Gd: Genetic Evenness Index

Description

This function allows calculation of a measure of compositional evenness, e.g. for a community of species or a population of genotypes (genetic individuals). Specifically, the index of evenness gives a measure of the probability that when two individuals are drawn randomly from the community (population) these individuals are of differing type (species or genotype; Nei 1987).

Usage

Gd(obs,scrub=FALSE)

Arguments

obs
A vector of species numbers.
scrub
Controls the treatment of species with zero abundance in the input observation. If TRUE the input vector is truncated to omit zero values.

Value

Returns the compositional evenness calculated from the sample.

Details

Used within the H.sampler function.

References

Nei M. 1987. Molecular Evolutionary Genetics. Columbia University Press, New York, p. 180.

See Also

H.sampler, Hs

Examples

Run this code
x=rpois(25,10)
Gd(x)

Run the code above in your browser using DataLab