ds_gini {divseg} | R Documentation |
Compute Gini Index
Description
Compute Gini Index
Usage
ds_gini(.data, .cols, .name, .comp = FALSE)
gini(..., .data = dplyr::across(everything()))
Arguments
.data |
|
.cols |
|
.name |
name for column with gini index. Leave missing to return a vector. |
.comp |
Default is FALSE. FALSE returns the sum, TRUE returns the components. |
... |
arguments to forward to ds_gini from gini |
Value
a tibble or numeric vector if .name missing
Examples
data("de_county")
ds_gini(de_county, c(pop_white, starts_with('pop_')))
ds_gini(de_county, starts_with('pop_'), 'gini')
[Package divseg version 0.0.5 Index]