general_split_trade_addresses {podcleaner}R Documentation

Mutate operation(s) in Scottish post office general directory data.frame column(s)

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

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.


[Package podcleaner version 0.1.2 Index]