Learn R Programming

divseg (version 0.1.0)

ds_abs_cent: Compute Absolute Centralization

Description

Compute Absolute Centralization

Usage

ds_abs_cent(.data, .cols, .name)

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

Value

a tibble or numeric vector if .name missing

Arguments

.data

tibble with sf geometry

.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 absolute centralization. Leave missing to return a vector.

...

arguments to forward to ds_abs_cent from abs_cent

Examples

Run this code
data('de_county')
ds_abs_cent(de_county, c(pop_white, starts_with('pop_')))
ds_abs_cent(de_county, c(pop_white, starts_with('pop_')), 'abs_cent')

Run the code above in your browser using DataLab