Skip to content

Commit

Permalink
Update generate_pairs to take more RLBigDataLinkage functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil Currie authored and Neil Currie committed Nov 1, 2024
1 parent 4fd541c commit 8bc3b6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 5 additions & 4 deletions R/record-linkage.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#'
#' @param df1 A data frame containing the first dataset to be compared.
#' @param df2 A data frame containing the second dataset to be compared.
#' @param excluded_cols A character vector of column names to be excluded from the comparison.
#' @param exclude see RLBigDataLinkage
#' @param blockfld see RLBigDataLinkage
#'
#' @return A `RecLinkData` object with the computed pairwise comparison weights.
#'
Expand All @@ -21,11 +22,11 @@
#' @import RecordLinkage
#' @export

generate_pairs <- function(df1, df2, excluded_cols){
generate_pairs <- function (df1, df2, exclude = numeric(0), blockfld = list()) {

# Find the pairs
pairs <- RLBigDataLinkage(df1, df2, exclude = excluded_cols, strcmp = TRUE,
strcmpfun = "levenshtein")
pairs <- RLBigDataLinkage(df1, df2, exclude = exclude, strcmp = TRUE,
blockfld = blockfld, strcmpfun = "levenshtein")

# Calculate weights
pairs_weighted <- epiWeights(pairs)
Expand Down
6 changes: 4 additions & 2 deletions man/generate_pairs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8bc3b6e

Please sign in to comment.