Standardize street names by converting to title case, removing punctuation, and optionally applying ordinal conversion as well as a dictionary to the data.

pm_street_std(.data, var, dictionary, ordinal = TRUE, locale = "us")

Arguments

.data

A postmastr object created with pm_prep

var

A character variable that may contain street suffixes

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").

locale

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