Learn R Programming

usa (version 0.1.2)

state_convert: Convert state identifiers

Description

Take a vector of state identifiers and convert to a common format.

Usage

state_convert(x, to = NULL)

Value

A character vector of single format state identifiers.

Arguments

x

A character vector of: state names, abbreviations, or FIPS codes.

to

The format returned: "abb", "name" or "fips".

Examples

Run this code
state_convert(c("AL", "Vermont", "06"))

Run the code above in your browser using DataLab