ds_isolation: Compute Isolation Index

View source: R/isolation.R

ds_isolationR Documentation

Compute Isolation Index

Description

Compute Isolation Index

Usage

ds_isolation(.data, .cols, .name, .comp = FALSE)

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

Arguments

.data

tibble

.cols

tidy-select Columns to compute the measure with. Must be at least 2 columns. If more than 2, treats first column as first group and sum of other columns as second.

.name

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

.comp

Default is FALSE. FALSE returns the sum, TRUE returns the components.

...

arguments to forward to ds_isolation from isolation

Value

a tibble or numeric vector if .name missing

Examples

data('de_county')
ds_isolation(de_county, c(pop_white, starts_with('pop_')))
ds_isolation(de_county, starts_with('pop_'), 'isolation')

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