ds_correlation {divseg}R Documentation

Compute Correlation Index

Description

Compute Correlation Index

Usage

ds_correlation(.data, .cols, .name)

correlation(..., .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 Correlation index. Leave missing to return a vector.

...

arguments to forward to ds_correlation from correlation

Value

a tibble or numeric vector if .name missing

Examples

data('de_county')
ds_correlation(de_county, c(pop_white, starts_with('pop_')))
ds_correlation(de_county, starts_with('pop_'), 'correlation')

[Package divseg version 0.0.5 Index]