inequality | R Documentation |
Calculate Gini indices for a phyloseq object.
inequality(x)
x |
|
Gini index is a common measure for relative inequality in economical income, but can also be used as a community diversity measure. Gini index is between [0,1], and increasing gini index implies increasing inequality.
A vector of Gini indices
Contact: Leo Lahti microbiome-admin@googlegroups.com
Relative Distribution Methods in the Social Sciences. Mark S. Handcock and Martina Morris, Springer-Verlag, Inc., New York, 1999. ISBN 0387987789.
diversity, reldist::gini (inspired by that implementation but independently written here to avoid external dependencies)
data(dietswap)
d <- inequality(dietswap)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.