utils_remove_address_prefix: Clear undesired address prefixes

Description Usage Arguments Value Examples

Description

Clear address entries in the provided directory dataframe of undesired prefixes such as "depot", "office", "store", "works" or "workshops".

Usage

1
utils_remove_address_prefix(directory, regex, ignore_case)

Arguments

directory

A directory dataframe with an addresses column.

regex

Regex character string to be use for matching.

ignore_case

Boolean specifying whether case should be ignored (TRUE) or not (FALSE) in search for regex in addresses column entries of directory.

Value

A dataframe.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
  directory <- data.frame(
    page = c("71", "71"),
    surname = c("ABOT", "ABRCROMBIE"), forename = c("Wm.", "Alex"),
    occupation = c("Wine and spirit merchant", "Baker"),
    addresses = c(
      "depot -; 1820 London    st. ; house, Mary hill.*",
      "workshop,,12 &;Dixon st.; residence,    Craigrownie, Cove.$   "
    ),
    stringsAsFactors = FALSE
  )
  regex <- globals_regex_address_prefix
  utils_remove_address_prefix(directory, regex, TRUE)

## End(Not run)

podcleaner documentation built on Jan. 12, 2022, 1:06 a.m.