Learn R Programming

divseg (version 0.1.0)

ds_inv_simpson: Compute Simpson Index

Description

Compute Simpson Index

Usage

ds_inv_simpson(.data, .cols, .name)

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

Value

a tibble or numeric vector if .name missing

Arguments

.data

tibble

.cols

tidy-select Columns to compute the measure with.

.name

name for column with Simpson Index Leave missing to return a vector.

...

arguments to forward to ds_inv_simpson from inv_simpson

Examples

Run this code
data('de_county')
ds_inv_simpson(de_county, starts_with('pop_'))
ds_inv_simpson(de_county, starts_with('pop_'), 'blau')

Run the code above in your browser using DataLab