ds_diversity {divseg} | R Documentation |
Compute Diversity
Description
This is equivalent to perplexity.
Usage
ds_diversity(.data, .cols, .name, q = 1)
diversity(..., .data = dplyr::across(everything()))
ds_perplexity(.data, .cols, .name, q = 1)
perplexity(..., .data = dplyr::across(everything()))
Arguments
.data |
|
.cols |
|
.name |
name for column with diversity. Leave missing to return a vector. |
q |
exponent parameter. Default 0. Can not be 1. |
... |
arguments to forward to ds_diversity from diversity |
Value
a tibble or numeric vector if .name missing
Examples
data('de_county')
ds_diversity(de_county, starts_with('pop_'))
ds_diversity(de_county, starts_with('pop_'), 'diversity')
[Package divseg version 0.0.5 Index]