splits_sub_admin: Compute Number of Sub-Administrative Units Split

Description Usage Arguments Value Examples

View source: R/splits.R

Description

Compute Number of Sub-Administrative Units Split

Usage

1
splits_sub_admin(plans, shp, sub_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

sub_admin

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

Value

numeric vector

Examples

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

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

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