ds_hhi: Compute Herfindahl-Hirshman Index

View source: R/hhi.R

ds_hhiR Documentation

Compute Herfindahl-Hirshman Index

Description

This is equivalent to the Simpson Index.

Usage

ds_hhi(.data, .cols, .name)

hhi(..., .data = dplyr::across(everything()))

ds_simpson(.data, .cols, .name)

simpson(..., .data = dplyr::across(everything()))

Arguments

.data

tibble

.cols

tidy-select Columns to compute the measure with.

.name

name for column with HHI. Leave missing to return a vector.

...

arguments to forward to ds_hhi from hhi

Value

a tibble or numeric vector if .name missing

Examples

data("de_county")
ds_hhi(de_county, starts_with('pop_'))
ds_hhi(de_county, starts_with('pop_'), 'blau')

divseg documentation built on Dec. 28, 2022, 1:53 a.m.