Description Usage Arguments See Also Examples
This is a convenience function to help standardize odd-looking state abbreviations based on a reference list of allowed abbreviations.
1 | recode_state(dat, state_table, oldvar = "state", newvar = "state_new")
|
dat |
data frame: input data with a state variable |
state_table |
data frame: input data holding valid abbreviations |
oldvar |
character: name of state variable |
newvar |
character: name of new state variable |
Other functions for standardizing state license data: recode_month
,
state_abbreviations
1 2 3 | data(state_abbreviations)
dat <- data.frame(state = c("M0", "mo", "Mo", "MR", "YY"))
recode_state(dat, state_abbreviations)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.