Learn R Programming

benthos (version 1.3-8)

simpson: Simpson's Measure of Concentration

Description

The probability that two inidividuals selected at random (with replacement, Hurlbert, 1971, p.579) from a sample will belong to the same species. For an infinite sample Simpson's Index is given by (Peet, 1974): $$\lambda = \sum_{i=1}^S p_i^2$$ For a finite sample by: $$L = \sum_{i=1}^S \frac{n_i (n_i-1)}{N (N-1)}$$ where \(p_i\) the proportion of the individuals in species \(i\), \(n_i\) the number of individuals in species \(i\) (relative abundance), and \(N\) the total number of individuals (total_abundance). The finite sample case has been implemented in function simpson (and simpson_).

Usage

simpson(.data = NULL, taxon, count)

simpson_(.data = NULL, taxon, count)

Value

The probability that two inidividuals selected at random from a sample will belong to the same species.

Arguments

.data

data in a data.frame, tibble, data.table, database etc.

taxon

name of column in .data containing taxa

count

name of column in .data containing counts

Functions

  • simpson_(): version suitable for calling from a function (see package lazyeval).

References

Peet, R. K. 1974, The Measurement of Species Diversity. Annual Review of Ecology and Systematics 5:285-307.

See Also

hpie

Examples

Run this code
     simpson(
         taxon = c("Euspira pulchella", "Nephtys cirrosa"),  
         count = c(6, 12)
     )
 

Run the code above in your browser using DataLab