Two utility functions. One converts state names to the state abbreviations,
and the second does the opposite.
Arguments
- state
A vector of state name, where there is a little fuzzy matching.
Value
Returns a vector of the same length with the corresponding state
names or abbreviations.
Examples
state2abbr("Minnesota")
#> [1] "MN"
# Some spelling/capitalization errors okay
state2abbr("mINnesta")
#> [1] "MN"