ds_interaction {divseg} | R Documentation |
Compute Interaction Index
Description
Compute Interaction Index
Usage
ds_interaction(.data, .cols, .name, .comp = FALSE)
interaction(..., .data = dplyr::across(everything()))
Arguments
.data |
|
.cols |
|
.name |
name for column with Interaction index. Leave missing to return a vector. |
.comp |
Default is FALSE. FALSE returns the sum, TRUE returns the components. |
... |
arguments to forward to ds_interaction from interaction |
Value
a tibble or numeric vector if .name missing
Examples
data('de_county')
ds_interaction(de_county, c(pop_white, starts_with('pop_')))
ds_interaction(de_county, starts_with('pop_'), 'interaction')
[Package divseg version 0.0.5 Index]