dm_paste: Create R code for a dm object
Description
dm_paste() takes an existing dm and emits the code necessary for its creation.
Usage
dm_paste(dm, select = NULL, ..., tab_width = 2, options = NULL, path = NULL)
Arguments
select
Deprecated, see "select" in the options argument.
tab_width
Indentation width for code from the second line onwards
options
Formatting options. A character vector containing some of:
Default NULL is equivalent to c("keys", "color")
path
Output file, if NULL the code is printed to the console.
Value
Code for producing the prototype of the given dm.
Details
The code emitted by the function reproduces the structure of the dm object.
The options argument controls the level of detail: keys, colors,
table definitions.
Data in the tables is never included, see dm_ptype() for the underlying logic.
Examples
Run this code# NOT RUN {
dm() %>%
dm_paste()
dm_nycflights13() %>%
dm_paste()
dm_nycflights13() %>%
dm_paste(options = "select")
# }
Run the code above in your browser using DataLab