create reid-format data from raw and anon data frame
Source:R/create_dummy_data.R
join_raw_anon_data.Rdcreate reid-format data from raw and anon data frame
Value
a data frame: the cross join (every RAW row paired with every ANON row) of `raw` and `anon`, with their column names prefixed by `raw_header`/`anon_header` respectively.
Examples
raw <- data.frame(ROW_NUMBER = 1:3, V = c(10, 20, 30))
anon <- data.frame(ROW_NUMBER = 1:3, V = c(11, 19, 32))
# every RAW row is paired with every ANON row: 3 x 3 = 9 candidate pairs.
# This is the shape the score_*() / reid_by_*() functions expect.
d <- join_raw_anon_data(raw, anon)
dim(d)
#> [1] 9 4
head(d, 3)
#> RAW_ROW_NUMBER RAW_V ANON_ROW_NUMBER ANON_V
#> 1 1 10 1 11
#> 2 2 20 1 11
#> 3 3 30 1 11