View source: R/gini_mean_diff.R
gini_mean_diff | R Documentation |
This function calculates the Gini Mean Difference value. The input is a vector of values for which the Gini Mean Difference is calculated.
gini_mean_diff(x, na.rm = TRUE)
x |
The vector of values for which the Gini Mean Difference will be calculated. This vector should be a numeric vector. |
na.rm |
This parameter controls whether NA values are removed from
the data prior to calculation. Default is |
The calculated Gini Mean Difference.
# Household money from income brackets (2010) from Table C of # https://en.wikipedia.org/wiki/Gini_coefficient. x <- c(13.7, 12.0, 10.9, 13.9, 17.7, 11.4, 12.1, 4.5, 3.9) gini_mean_diff(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.