Takes a column of a redist_plans object and averages it across a set of
draws for each precinct.
avg_by_prec(plans, x, draws = NA)a vector of length matching the number of precincts, containing the average.
a redist_plans object
an expression to average. Tidy-evaluated in plans.
which draws to average. NULL will average all draws, including
reference plans. The special value NA will average all sampled draws. An
integer, logical, or character vector indicating specific draws may also be
provided.