Create a table description that includes the actual data. Prevents wastefull table copies in
immediate pipelines. Used with ex()
.
wrap(d, ..., table_name = NULL, env = parent.frame())
data.frame
not used, force later argument to be referred by name
character, name of table
environment to work in.
a table description, with data attached
if(requireNamespace('rqdatatable')) {
d <- data.frame(x = 1:3, y = 4:6)
d %.>%
wrap(.) %.>%
extend(., z := x + y) %.>%
ex(.)
}
#> x y z
#> 1 1 4 5
#> 2 2 5 7
#> 3 3 6 9