powered by
Aggregates block table values up to a higher level, normally precincts, hence the name block2prec.
block2prec(block_table, matches, geometry = FALSE)
dataframe with length(unique(matches)) rows
Required. Block table output from create_block_table
Required. Grouping variable to aggregate up by, typically made with geo_match
Boolean. Whether to keep geometry or not.
set.seed(1) data(rockland) rockland$id <- sample(1:2, nrow(rockland), TRUE) block2prec(rockland, rockland$id)
Run the code above in your browser using DataLab