redist.samplepart
uses a spanning tree method to randomly sample
redistricting plans.
redist.samplepart(adjobj, ndists, popvec, pop_filter, pop_constraint,
contiguitymap, nsamp, n_cores)
An adjacency list, matrix, or object of class
SpatialPolygonsDataFrame
.
The desired number of congressional districts
Population vector for adjacency object. Provide if filtering by population
Boolean. Whether or not to filter on population parity. Default is FALSE.
Strength of population filter if filtering on distance to parity.
Use queens or rooks distance criteria for generating an adjacency list from a "SpatialPolygonsDataFrame" data type. Default is "rooks".
Number of samples to draw. Default is 1000.
Number of cores to parallelize over for parity calculation and compactness calculation. Default is 1.
redist.samplepart
returns a list where the first entry is the
randomly sampled redistricting plan, and the second entry is the number of
possible redistricting plans from the implied spanning tree.