District numbers in simulated plans are by and large random. This function will renumber the districts across all simulated plans in order of a provided quantity of interest.
number_by(data, x, desc = FALSE)
a modified redist_plans
object. New district numbers will be
stored as an ordered factor variable in the district
column. The
district numbers in the plan matrix will match the levels of this factor.
a redist_plans
object
<data-masking>
the quantity of interest.
TRUE
if district should be sorted in descending order.