Learn R Programming

redistmetrics (version 1.0.11)

splits_sub_total: Count the Total Sub-Administrative Unit in Each Plan

Description

Counts the total number of sub-administrative splits.

Usage

splits_sub_total(plans, shp, sub_admin)

Value

numeric matrix

Arguments

plans

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

shp

A redist_map object, tibble, or data frame containing other columns.

sub_admin

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

Examples

Run this code
data(nh)
data(nh_m)
# For a single plan:
splits_sub_total(plans = nh$r_2020, shp = nh, sub_admin = county)

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

Run the code above in your browser using DataLab