Create a new column containing postal code data.

pm_postal_parse(.data, locale = "us")

Arguments

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

Value

A tibble with a new column pm.zip that contains the zip-code. If a postal code is not detected in the string, a value of NA will be returned. If the "zip+4" formatting is detected in the string, a second column named pm.zip4 will be returned with the carrier route parsed out of the five-digit postal code.