pm_state_std: Standardize Parsed State Names

Description Usage Arguments Value

View source: R/state.R

Description

Convert state names to the USPS approved two-letter abbreviation.

Usage

1
pm_state_std(.data, var, dictionary, locale = "us")

Arguments

.data

A postmastr object created with pm_prep

var

A character variable that may contain city names

dictionary

Optional; a tbl created with pm_dictionary to be used as a master list for states. If none is provided, the states object will be used as the default directory.

locale

A string indicating the country these data represent; the only current option is "us" but this is included to facilitate future expansion.

Value

A tibble with an updated variable that contains the two-letter abbreviation for the given U.S. state. This follows USPS addressing standards, which require that the state abbreviation be used.


slu-openGIS/postmastr documentation built on Dec. 9, 2020, 3:32 a.m.