splits_admin: Compute Number of Administrative Units Split

Description Usage Arguments Value Examples

View source: R/splits.R

Description

Compute Number of Administrative Units Split

Usage

1
splits_admin(plans, shp, admin)

Arguments

plans

redist_plans object or plans_matrix where each row indicates a district assignment and each column is a plan

shp

redist_map object or tibble with sf geometry column

admin

unqouted name of column in shp with numeric identifiers for administrative units

Value

numeric vector

Examples

1
2
3
4
5
6
7
data(nh)
data(nh_m)
# For a single plan:
splits_admin(plans = nh$r_2020, shp = nh, admin = county)

# Or many plans:
splits_admin(plans = nh_m[, 3:5], shp = nh, admin = county)

redistmetrics documentation built on Dec. 20, 2021, 5:07 p.m.