ds_shannon: Compute Shannon Index

Description Usage Arguments Value Examples

View source: R/shannon.R

Description

Compute Shannon Index

Usage

1
2
3
ds_shannon(.data, .cols, .name)

shannon(..., .data = dplyr::cur_data_all())

Arguments

.data

tibble

.cols

tidy-select Columns to compute the measure with.

.name

name for column with Shannon index. Leave missing to return a vector.

...

arguments to forward to ds_shannon from shannon

Value

a tibble or numeric vector if .name missing

Examples

1
2
3
data("de_county")
ds_shannon(de_county, starts_with('pop_'))
ds_shannon(de_county, starts_with('pop_'), 'shannon')

divseg documentation built on Aug. 9, 2021, 9:09 a.m.