redist.sink.plan: Sink Plans to 1:ndists

View source: R/reindex.R

redist.sink.planR Documentation

Sink Plans to 1:ndists

Description

Takes a plan and renumbers it to be from 1:ndists

Usage

redist.sink.plan(plan)

Arguments

plan

vector of assignments, required.

Value

A vector with an ID that corresponds from 1:ndists, and attribute n indicating the number of districts.

Examples

data(fl25_enum)
plan <- fl25_enum$plans[, 5118]
# Subset based on something:
plan <- plan[plan != 2]
plan <- vctrs::vec_group_id(plan)
# Now plan can be used with redist_flip()
plan


kosukeimai/redist documentation built on March 28, 2024, 7:36 a.m.