gini: Calculate Gini Index of a numeric vector

Description Usage Arguments Details Value Author(s) References Examples

View source: R/gini.R

Description

Calculate the Gini index of a numeric vector.

Usage

1
gini(x)

Arguments

x

A numeric vector.

Details

The Gini index (Gini coefficient) is a measure of statistical dispersion. A Gini coefficient of zero expresses perfect equality where all values are the same. A Gini coefficient of one expresses maximal inequality among values.

Value

A numeric value between 0 and 1.

Author(s)

Jitao David Zhang <[email protected]>

References

Gini. C. (1912) Variability and Mutability, C. Cuppini, Bologna 156 pages.

Examples

1
2
testValues <- runif(100)
gini(testValues)

BioQC documentation built on Nov. 17, 2017, 10:11 a.m.