add_from_x: Add a variable from one of the data sets to pairs

View source: R/add_from_x.R

add_from_xR Documentation

Add a variable from one of the data sets to pairs

Description

Add a variable from one of the data sets to pairs

Usage

add_from_x(pairs, variable, new_variable = variable, ...)

add_from_y(pairs, variable, new_variable = variable, ...)

Arguments

pairs

data.table with pairs. Should contain the columns .x and .y.

variable

name of the variable that should be added

new_variable

optional variable name of the new variable in pairs. When omitted variable is used.

...

other parameters are passed on to compare_vars. Especially inplace, x and y might be of interest.

Value

Returns the pairs with the column added. When inplace = TRUE pairs is returned invisibly and the original pairs is modified.


reclin2 documentation built on May 29, 2024, 4:21 a.m.