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