state2abbr: Convert state names to abbreviations

View source: R/state2abbr.R

state2abbrR Documentation

Convert state names to abbreviations

Description

Two utility functions. One converts state names to the state abbreviations, and the second does the opposite.

Usage

state2abbr(state)

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.

Author(s)

David Diez

See Also

abbr2state, county, county_complete

Examples


state2abbr("Minnesota")

# Some spelling/capitalization errors okay
state2abbr("mINnesta")

usdata documentation built on June 22, 2024, 9:57 a.m.