by_plan: Shorten District by Plan vector

View source: R/by_plan.R

by_planR Documentation

Shorten District by Plan vector

Description

If x is repeated for each district, it returns a plan level value. Otherwise it returns x.

Usage

by_plan(x, ndists)

Arguments

x

summary statistic at the district level

ndists

numeric. Number of districts. Estimated as the gcd of the unique run length encodings if missing.

Value

x or plan level subset of x

Examples

by_plan(letters)
by_plan(rep(letters, each = 2))


redistmetrics documentation built on May 29, 2024, 8:02 a.m.