pm_rebuild: Re-construct Street Addressed from Parsed Elements

Description Usage Arguments

View source: R/build.R

Description

Create a single address from parsed components.

Usage

1
2
pm_rebuild(.data, start, end, new_address, include_commas = FALSE,
    keep_parsed, side = "right", left_vars, keep_ids = FALSE, locale = "us")

Arguments

.data

An object with raw and parsed data created by pm_rebuild

start

Variable name to begin rebuilding process with, typically the house number

end

Variable name to end rebuilding process with, typically the street suffix or postal code

new_address

Optiona; name of new variable to store rebuilt address in. If not specified, the re-build addressed will be stored in pm.address.

include_commas

A logical scalar; if TRUE, a comma is added both before and after the city name in rebuild addresses. If FALSE (default), no punctuation is added.

keep_parsed

Character string; if "yes", all parsed elements will be added to the source data after replacement. If "limited", only the pm.city, pm.state, and postal code variables will be retained. Otherwise, if "no", only the rebuilt address will be added to the source data (default).

side

One of either "left" or "right" - should parsed data be placed to the left or right of the original data? Placing data to the left may be useful in particularly wide data sets.

left_vars

A character scalar or vector of variables to place on the left-hand side of the output when side is equal to "middle".

keep_ids

Logical scalar; if TRUE, the identification numbers will be kept in the source data after replacement. Otherwise, if FALSE, they will be removed (default).

locale

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


slu-openGIS/postmastr documentation built on March 14, 2019, 8:01 p.m.