View source: R/internal_functions.R
gini_coeff | R Documentation |
The function computes Gini coefficient from a numeric vector
gini_coeff(x, unbiased = TRUE)
x |
A numeric vector with positive values |
unbiased |
A logical value indicating whether the computed coefficient is biased or not. Unbiased value are equal to n/(n-1) times the biased ones. |
A numeric value corresponding to the Gini coefficient of the numeric vector
P. Savary
x <- c(10, 2, 5, 15) gini <- gini_coeff(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.