View source: R/compare_pairs.R
compare_pairs.cluster_pairs | R Documentation |
Compare pairs on a set of variables common in both data sets
## S3 method for class 'cluster_pairs'
compare_pairs(
pairs,
on,
comparators = list(default_comparator),
default_comparator = cmp_identical(),
new_name = NULL,
...
)
compare_pairs(
pairs,
on,
comparators = list(default_comparator),
default_comparator = cmp_identical(),
...
)
## S3 method for class 'pairs'
compare_pairs(
pairs,
on,
comparators = list(default_comparator),
default_comparator = cmp_identical(),
x = attr(pairs, "x"),
y = attr(pairs, "y"),
inplace = FALSE,
...
)
pairs |
|
on |
character vector of variables that should be compared. |
comparators |
named list of functions with which the variables are compared.
This function should accept two vectors. Function should either return a vector
or a |
default_comparator |
variables for which no comparison function is defined using
|
new_name |
name of new object to assign the pairs to on the cluster nodes. |
... |
Ignored for now |
x |
|
y |
|
inplace |
logical indicating whether |
It is assumed the variables in on
are present in both x
and y
. Variables
with the same names are added to pairs.
When the comparator
returns a data.table
multiple columns are added to pairs
.
The names of these columns are variable
pasted together with the names of
the data.table
returned by comparator
(separated by "_").
Returns the data.table
pairs
with one or more columns added in
case of compare_pairs.pairs
.
In case of compare_pairs.cluster_pairs
, compare_pair.pairs
is called on
each cluster node and the resulting pairs are assigned to new_name
in
the environment reclin_env
. When new_name
is not given (or
equal to NULL) the original pairs on the nodes are overwritten.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.