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

pm_city_std(.data, var, dictionary)

Arguments

.data

A postmastr object created with pm_prep, a tbl, or a data frame

var

A character variable that may contain city names

dictionary

A tbl created with pm_dictionary to be used as a master list for cities.

Value

A tibble with an updated variable that contains the corrected city name.