fct_statefips | R Documentation |
Convert a state FIPS code to a labeled factor
fct_statefips(x, labels = c("name", "abbrv"))
x |
Vector of state FIPS codes. If x is a character vector, it will first be coerced to numeric. |
labels |
A character string specifying how to label the levels: |
x as a labeled factor
state_fips for a dataset containing state FIPS codes, state names, and postal abbreviations.
fips <- c(1, 6, 11, 48)
fct_statefips(fips)
fct_statefips(fips, labels = "abbrv")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.