check_y_vars_to_keep {joyn} | R Documentation |
Check variables in y that will be kept in returning table
Description
check and return variable names in y to keep in returning table, excluding those that are keys of the merge
Usage
check_y_vars_to_keep(y_vars_to_keep, y, by)
Arguments
y_vars_to_keep |
either TRUE, if keep all vars in |
y |
data frame |
by |
A vector of shared column names in |
Value
character vector with variable names from y
table
Examples
## Not run:
y1 = data.table(id = 1:2,
y = c(11L, 15L))
# With y_vars_to_keep TRUE
joyn:::check_y_vars_to_keep(TRUE, y1, by = "id")
# With y_vars_to_keep FALSE
joyn:::check_y_vars_to_keep(FALSE, y1, by = "id")
# Specifying which y vars to keep
joyn:::check_y_vars_to_keep("y", y1, by = "id")
## End(Not run)
[Package joyn version 0.2.4 Index]