block2prec: Aggregate Block Table by Matches

View source: R/datatables.R

block2precR Documentation

Aggregate Block Table by Matches

Description

Aggregates block table values up to a higher level, normally precincts, hence the name block2prec.

Usage

block2prec(block_table, matches, geometry = FALSE)

Arguments

block_table

Required. Block table output from create_block_table

matches

Required. Grouping variable to aggregate up by, typically made with geo_match

geometry

Boolean. Whether to keep geometry or not.

Value

dataframe with length(unique(matches)) rows

Examples

set.seed(1)
data(rockland)
rockland$id <- sample(1:2, nrow(rockland), TRUE)
block2prec(rockland, rockland$id)


christopherkenny/geomander documentation built on Feb. 18, 2024, 7:58 p.m.