redist.reorder: Reorders district numbers

View source: R/reindex.R

redist.reorderR Documentation

Reorders district numbers

Description

Ensures that for each column in the plans object, the first district listed is 1, the second is 2, up to n districts. Assumes that all columns have the same number of districts as the first.

Usage

redist.reorder(plans)

Arguments

plans

A numeric vector (if only one map) or matrix with one row for each precinct and one column for each map.

Value

integer matrix

Examples

cds <- matrix(c(rep(c(4L, 5L, 2L, 1L, 3L), 5),
    rep(c(5L, 4L, 3L, 2L, 1L), 2), rep(c(4L, 5L, 2L, 1L, 3L), 3)), nrow = 25)
redist.reorder(cds)


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