avg_by_prec {redist} | R Documentation |
Average a variable by precinct
Description
Takes a column of a redist_plans
object and averages it across a set of
draws
for each precinct.
Usage
avg_by_prec(plans, x, draws = NA)
Arguments
plans |
a |
x |
an expression to average. Tidy-evaluated in |
draws |
which draws to average. |
Value
a vector of length matching the number of precincts, containing the average.
[Package redist version 4.2.0 Index]