Adds standardized address and, optionally, unnest house ranges. All logical variables that were created during the data cleaning process (i.e. pm.hasHouse, pm.hasDir, etc.) are removed at this stage.

pm_replace(source, street, intersect, operator = "at", unnest = FALSE)

Arguments

source

Original source data to merge clean addresses with.

street

A postmastr object created with pm_prep with street addresses that has been readied for replacement by fully parsing the data.

intersect

A postmastr object created with pm_prep with intersections that has been readied for replacement by fully parsing the data.

operator

A character scalar to be used as the intersection operator (between the 'x' and 'y' sides of the intersection).

unnest

A logical scalar; if TRUE, house ranges will be unnested (i.e. a house range that has been expanded to cover four addresses with pm_houseRange_parse will be converted from a single observation to four observations, one for each house number). If FALSE (default), the single observation will remain.

Value

The source data with a parsed address elements added to the left side of the source data.