Determine the presence of U.S. zip-codes in a string. This will
identify both five digit zip-codes (e.g. 63108
) as well as zip+4
codes (e.g. 63108-3412
). The zip-code must be the final word in
the string to return TRUE
.
pm_postal_detect(.data, locale = "us")
.data | A postmastr object created with pm_prep |
---|---|
locale | A string indicating the country these data represent; the only current option is "us" but this is included to facilitate future expansion. |
A tibble with a new logical variable pm.hasZip
that is
TRUE
if a zip-code is found in the last word of the address
and FALSE
otherwise.