View source: R/convert_state_names.R
convert_state_names | R Documentation |
Also include other areas such as Puerto Rico and Guam, and even United states for dealing with census data. Examples of state names: full – "District of Columbia", "Kentucky"; lowercase – "district of columbia", "kentucky"; abbr – "DC", "KY".
convert_state_names(states, to)
states |
string, vector of state names to be converted. |
to |
string, format after convertion, take values of "full", "lowercase", and "abbr". |
a vector of converted state names
convert_state_names(c("Alabama", "California","Connecticut"), "abbr")
# wrong names return NA and a warning
convert_state_names(c("DC", "AA","MA"), "full")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.