Learn R Programming

OasisR (version 1.0.0)

HShannon: A function to compute Shannon-Wiener diversity index

Description

Shannon-Wiener diversity index is based on entropy notion and measures the population heterogeneity.

Usage

HShannon(x)

Arguments

x
- an object of class matrix (or that can be coerced to that class), where each column represents the distribution of a population group, within spatial units. The number of columns should be greater than one (at least two population groups are require

Value

  • Shannon-Wiener diversity index

References

Shannon C. E. (1948) A mathematical theory of communication. Bell System Technical Journal (27)

See Also

Other multigroup eveness indices: JPielou, ISimpson, GiniMulti, DMulti Other multigroup indices: PIsol, RelDivers

Examples

Run this code
x <- slot(GreHSize, 'data')[ ,3:5]
HShannon(x)

Run the code above in your browser using DataLab