pm_houseAlpha_detect: Detect Presence of Alphanumeric House Numbers

Description Usage Arguments Value

View source: R/houseAlpha.R

Description

Detect the presence of U.S. alphanumeric house numbers in a string address (i.e. 123A Main St).

Usage

1
pm_houseAlpha_detect(.data, position = "any", locale = "us")

Arguments

.data

A postmastr object created with pm_prep

position

A string indicating where letters are located; one of either "any" (anywhere in the house number), "front" (initial letters of the house number), "end" (last letters of the house number), or "middle" (in the middle but not at the ends).

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 beginning with pm.hasAlpha. that is TRUE if letters are detected in the specified position and FALSE otherwise. If pm.hasAlpha. has a a suffix, it corresponds to the "any" position. If pm.hasAlpha. has a f suffix, it corresponds to the "front" position. If pm.hasAlpha. has a e suffix, it corresponds to the "end" position. Finally, If pm.hasAlpha. has a m suffix, it corresponds to the "middle" position. If a NA value is returned, it is because the house number is an address range.


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