cs_address: Create a Single Address Field

View source: R/address.R

cs_addressR Documentation

Create a Single Address Field

Description

The street address data in SLMPD releases (either ILEADSAddress and ILEADSStreet or CADAddress and CADStreet) are stored in separate columns. In order to faciliate geocoding, this function combines the fields and removes inappropriate characters in the address fields.

Usage

cs_address(.data, address, street, newVar)

Arguments

.data

A tibble or data frame

address

Name of address number variable (typically either ILEADSAddress or CADAddress)

street

Name of street name variable (typically either ILEADSStreet or CADStreet)

newVar

Name of new variable to store concatenated address

Value

A copy of the object with a character vector that contains the concatenated street address data.

Examples

# load example data
testData <- january2018

# add concatenated address variable
testData <- cs_address(testData, address = ileads_address, street = ileads_street, newVar = address)


chris-prener/compStatR documentation built on Jan. 25, 2024, 10:03 p.m.