pm_postal_detect: Detect Presence of Postal Codes

Description Usage Arguments Value

View source: R/postal.R

Description

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.

Usage

1
pm_postal_detect(.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 logical variable pm.hasZip that is TRUE if a zip-code is found in the last word of the address and FALSE otherwise.


chris-prener/postmastr documentation built on Dec. 13, 2020, 3:39 a.m.