Converts the remaining text of pm.address to title case and stores it in a new variable named pm.street.

pm_street_parse(.data, dictionary, ordinal = TRUE, drop = TRUE, locale = "us")

Arguments

.data

A postmastr object created with pm_prep

dictionary

Optional; a tbl created with pm_append to be used to standardize specific street names.

ordinal

A logical scalar; if TRUE, street names that contain numeric words values (i.e. "Second") will be converted and standardized to ordinal values (i.e. "2nd"). The default is TRUE because it returns much more compact clean addresses (i.e. "168th St" as opposed to "One Hundred Sixty Eigth St").

drop

A logical scalar; if TRUE, the pm.address variable will be dropped from the postmastr object.

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 a new character variable pm.street that contains the two-letter abbreviation for the given U.S. state. Variables are automatically re-ordered, so the new vector will not be in the last position of the tibble.

Details

This is typically the last function to be executed before rebuilding and replacing.