assign_race_labels: Convert the race labels from a data source to Racine race...

View source: R/assign_race_labels.R

assign_race_labelsR Documentation

Convert the race labels from a data source to Racine race labels

Description

Convert the race labels from a data source to Racine race labels

Usage

assign_race_labels(
  .x,
  mapping,
  ...,
  target_name = "Race/Ethnicity",
  .levels = hiRx::RACE_LABELS_RACINE
)

Arguments

.x

a data frame with a column of race labels

mapping

a data frame that relates the source's labels to Racine's

...

values for the 'by' argument of an 'inner_join' between '.x' and 'mapping'

target_name

optional, defaults to "Race/Ethnicity".

.levels

optional, the new levels for the Race/Ethnicity factor.

Value

a new data frame with a factor, 'Race/Ethnicity', of Racine races.


higherX4Racine/hiRx documentation built on Nov. 18, 2024, 10:20 a.m.