collapse5: Collapse Full Race Categories into 5 Categories

View source: R/collapse.R

collapse5R Documentation

Collapse Full Race Categories into 5 Categories

Description

Collapses Other, AIAN, NHPI, and Two+ into Other, by prefix.

Usage

collapse5(.data, prefix)

Arguments

.data

tibble, data.frame, or sf tibble

prefix

The prefix(es) for the race categories. Must be a character vector.

Value

.data with columns collapsed

Examples

data(mt_county)
mt_county <- mt_county %>% collapse5(prefix = c('pop_', 'vap_'))

censable documentation built on Nov. 20, 2022, 1:06 a.m.