scores_data: Score Data

Description Usage Arguments Value Examples

View source: R/scores_data.R

Description

Description

Usage

1
2
3
4
5
6
7
8
9
scores_data(
  .matches,
  .source,
  .target,
  .cols_match,
  .cols_exact = NULL,
  .w_unique = NULL,
  .w_custom = NULL
)

Arguments

.matches

Dataframe produced by match_data()

.source

The Source Dataframe.
(Must contain a unique column id and the columns you want to match on)

.target

The Target Dataframe.
(Must contain a unique column id and the columns you want to match on)

.cols_match

A character vector of columns to perform fuzzy matching.

.cols_exact

Columns that must be matched perfectly.
(Data will be partitioned using those columns)

.w_unique

Weights calculated by get_weights()

.w_custom

A named numeric vector that matches the columns of .cols_match w/o the columns of .cols_exact

Value

A dataframe

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
tab_source <- table_source[1:100, ]
tab_target <- table_target[1:999, ]
cols_match <- c("name", "iso3", "city", "address")
cols_exact <- "iso3"
cols_join  <- c("name", "iso3")
tab_match <- match_data(
  .source = tab_source,
  .target = tab_target,
  .cols_match = cols_match,
  .cols_exact = cols_exact,
  .cols_join = cols_join,
  .method = "soundex",
)
scores_data(
  .matches = tab_match, 
  .source = tab_source, 
  .target = tab_target, 
  .cols_match = cols_match,
  .cols_exact = cols_exact
  )

MatthiasUckert/Rmatch documentation built on Jan. 3, 2022, 11:09 p.m.