If x
is repeated for each district, it returns a plan level value. Otherwise
it returns x
.
by_plan(x, ndists)
summary statistic at the district level
numeric. Number of districts. Estimated as the gcd of the unique run length encodings if missing.
x or plan level subset of x
by_plan(letters)
#> [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s"
#> [20] "t" "u" "v" "w" "x" "y" "z"
by_plan(rep(letters, each = 2))
#> [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s"
#> [20] "t" "u" "v" "w" "x" "y" "z"