general_split_trade_addresses: Mutate operation(s) in Scottish post office general directory...

Description Usage Arguments Value

View source: R/general.r

Description

Attempts to separate multiple trade addresses in the Scottish post office general directory data.frame provided for entries for which more than one are provided.

Usage

1
2
3
4
5
6
7
8
9
general_split_trade_addresses(
  directory,
  regex_split,
  ignore_case_split,
  regex_filter,
  ignore_case_filter,
  regex_match,
  ignore_case_match
)

Arguments

directory

A Scottish post office general directory in the form of a data.frame or other object that inherits from the data.frame class such as a tibble. Columns must at least include addresses.trade.

regex_split

Regex to use to split addresses.

ignore_case_split

Boolean specifying whether case should be ignored (TRUE) or not (FALSE) for regex_split above.

regex_filter

Regex to use to search for address entries with post-split undesired leftovers.

ignore_case_filter

Boolean specifying whether case should be ignored (TRUE) or not (FALSE) for regex_filter above.

regex_match

Regex to use to clear address entries from post-split undesired leftovers.

ignore_case_match

Boolean specifying whether case should be ignored (TRUE) or not (FALSE) for regex_match above.

Value

A data.frame of the same class as the one provided in directory; columns include at least address.trade. Multiple trade addresses are separated for entries for which more than one are provided. Each trade address identified lives on an individual row with information in the other columns duplicated.


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