aggregate_categories: Aggregation for Oakland variables.

Description Usage Arguments Value

View source: R/aggregate_categories.R

Description

Take mean, median, or sum of all variables by ethnoracial, income, and gentrification grouping.

Usage

1
aggregate_categories(dat, compute = "mean", group_vars = c(NULL))

Arguments

dat

Data with a column containing census tracts ("tractid10") and categorical variables to group by or numeric variables to aggregate.

compute

"mean", "median", or "sum"

group_vars

Optional list of variables to group_by before aggregation. Note: All non-numeric variables should either be included here or de-selected.

Value

Aggregated data frame.


Changing-Cities-Research-Lab/oakViz documentation built on May 13, 2021, 7:19 p.m.