compare_vars.cluster_pairs {reclin2} | R Documentation |
Compare pairs on given variables
Description
Compare pairs on given variables
Usage
## S3 method for class 'cluster_pairs'
compare_vars(
pairs,
variable,
on_x = variable,
on_y = on_x,
comparator = cmp_identical(),
new_name = NULL,
...
)
compare_vars(
pairs,
variable,
on_x = variable,
on_y = on_x,
comparator = cmp_identical(),
...
)
## S3 method for class 'pairs'
compare_vars(
pairs,
variable,
on_x = variable,
on_y = on_x,
comparator = cmp_identical(),
x = attr(pairs, "x"),
y = attr(pairs, "y"),
inplace = FALSE,
...
)
Arguments
pairs |
|
variable |
character vector with name of resulting column name that is added to pairs. |
on_x |
character vector with the column names from |
on_y |
character vector with the column names from |
comparator |
function with which the variables are compared. When |
new_name |
name of new object to assign the pairs to on the cluster nodes. |
... |
Passed on to the comparator function. |
x |
|
y |
|
inplace |
logical indicating whether |
Details
When 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 "_").
Value
Returns the data.table
pairs
with one or more columns added.