combine_match_general_to_trades {podcleaner} | R Documentation |
Match general to trades directory records
Description
Attempts to complement Scottish post office trades directory data.frame with house address information from the Scottish post office general directory data.frame provided by matching records from the two datasets using the distance metric specified.
Usage
combine_match_general_to_trades(
trades_directory,
general_directory,
progress = TRUE,
verbose = FALSE,
distance = TRUE,
matches = TRUE,
...
)
Arguments
trades_directory |
A Scottish post office trades directory in the form
of a data.frame or other object that inherits from the data.frame class
such as a |
general_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 |
progress |
Whether progress should be shown ( |
verbose |
Whether the function should be executed silently ( |
distance |
Whether ( |
matches |
Whether ( |
... |
Further arguments to be passed down to
|
Value
A tibble
; columns include at least surname
,
forename
, address.trade.number
, address.trade.body
,
address.house.number
, address.house.body
.
Examples
trades_directory <- tibble::tibble(
page = rep("71", 3L),
rank = c("135", "326", "586"),
surname = c("Abbott", "Abercromby", "Blair"),
forename = c("William", "Alexander", "John Hugh"),
occupation = c("Wine and spirit merchant", "Baker", "Victualler"),
type = rep("OWN ACCOUNT", 3L),
address.trade.number = c("18, 20", "12", "280"),
address.trade.body = c("London Road", "Dixon Place", "High Street")
)
general_directory <- tibble::tibble(
page = rep("71", 2L),
surname = c("Abbott", "Abercromby"), forename = c("William", "Alexander"),
occupation = c("Wine and spirit merchant", "Baker"),
address.trade.number = c("18, 20", ""),
address.house.number = c("136", "29"),
address.trade.body = c("London Road", "Dixon Place"),
address.house.body = c("Queen Square", "Anderston Quay")
)
combine_match_general_to_trades(
trades_directory, general_directory, progress = TRUE, verbose = FALSE,
distance = TRUE, method = "osa", max_dist = 5
)