Computes the Gini/Simpson coefficient. NAs from the data are omitted.
Usage
gini.simpson(x, na.rm = TRUE)
gini.simpson(x, na.rm = TRUE)
Arguments
x
A data.frame, a matrix-like, or a vector.
na.rm
A logical value to deal with NAs.
...
Additional arguements (currently ignored)
encoding
UTF-8
Details
The Gini-Simpson quadratic index is a classic measure of diversity, widely used by social scientists and ecologists. The Gini-Simpson is also known as Gibbs-Martin index in sociology, psychology and management studies, which in turn is also known as the Blau index. The Gini-Simpson index is computed as $1 - \lambda = 1 - \sum_{i=1}^R p_i^2 = 1 - 1/{}^2D$.