dm_paste {dm}R Documentation

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

dm

A dm object.

select

Deprecated, see "select" in the options argument.

...

Must be empty.

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.

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.

Value

Code for producing the prototype of the given dm.

Examples

dm() %>%
  dm_paste()


dm_nycflights13() %>%
  dm_paste()

dm_nycflights13() %>%
  dm_paste(options = "select")


[Package dm version 0.2.8 Index]