tabulate_patterns: Create a table of comparison patterns

Description Usage Arguments Details Value Examples

View source: R/tabulate_patterns.R

Description

Create a table of comparison patterns

Usage

1
tabulate_patterns(pairs, ..., comparators = NULL, by = NULL)

Arguments

pairs

a pairs object, such as generated by pair_blocking

...

passed on to other methods.

comparators

a list with comparison functions for each of the columns. When missing or NULL, attr(pairs, "comparators") is used. Therefore, this parameter usually does not need to be specified.

by

the columns that should be used for the comparison vectors. When missing or NULL, attr(pairs, "by") is used. Therefore, this parameter usually does not need to be specified.

Details

Since comparison vectors can contain continuous numbers (usually between 0 and 1), this could result in a very large number of possible comparison vectors. Therefore, the comparison vectors are passed on to the comparators in order to threshold them. This usually results in values 0 or 1. Missing values are usually codes as 0. However, this all depends on the comparison functions used. For more information see the documentation on the comparison functions.

Value

Returns a data.frame with all unique comparison patterns that exist in pairs, with a column n added with the number of times each pattern occurs.

Examples

1
2
3
4
data("linkexample1", "linkexample2")
pairs <- pair_blocking(linkexample1, linkexample2, "postcode")
pairs <- compare_pairs(pairs, c("lastname", "firstname", "address", "sex"))
tabulate_patterns(pairs)

reclin documentation built on Nov. 23, 2021, 9:09 a.m.