Construct a table description of a local data.frame.
local_td(
d,
...,
name = NULL,
name_source = wrapr::mk_tmp_name_source("rqltd"),
env = parent.frame()
)
data.frame or name of data.frame to use as a data source.
not used, force later arguments to be optional.
if not null name to user for table.
temporary name source.
environment to work in.
a relop representation of the data
d <- data.frame(x = 1)
local_td(d)
#> [1] "mk_td(\"d\", c( \"x\"))"
#> x
#> 1 1
local_td("d")
#> [1] "mk_td(\"d\", c( \"x\"))"
#> x
#> 1 1
local_td(as.name("d"))
#> [1] "mk_td(\"d\", c( \"x\"))"
#> x
#> 1 1
local_td(data.frame(x = 1))
#> [1] "mk_td(\"rqltd_49816583972231100365_0000000000\", c( \"x\"))"
#> x
#> 1 1
d %.>% local_td # needs wrapr 1.5.0 or newer to capture name
#> [1] "mk_td(\"d\", c( \"x\"))"
#> x
#> 1 1