View source: R/state-convert.R
| state_convert | R Documentation |
Take a vector of state identifiers and convert to a common format. Supports all five identifier types in state_ids: USPS abbreviation, full name, FIPS code, AP style abbreviation, and ISO 3166-2 code.
state_convert(x, to = c("abb", "name", "fips", "ap", "iso"))
x |
A character vector of state identifiers in any supported format. |
to |
The format returned: |
A character vector of single format state identifiers.
state_convert(c("AL", "Vermont", "06"))
state_convert(c("AL", "Vermont", "06"), to = "name")
state_convert(c("AL", "Vermont", "06"), to = "fips")
state_convert(c("AL", "Vermont", "06"), to = "ap")
state_convert(c("AL", "Vermont", "06"), to = "iso")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.