print.dust: Print A 'dust' Table

Description Usage Arguments Details Author(s) Examples

View source: R/print.dust.R


Apply the formatting to a dust object and print the table.


## S3 method for class 'dust'
print(x, ..., asis = TRUE, linebreak_at_end = 2)

## S3 method for class 'dust_list'
print(x, ..., asis = TRUE)



An object of class dust


Additional arguments to pass to the print method. Currently ignored.


A logical value that controls if the output is printed using knitr::asis_output. See Details.


Used only in HTML tables; defines the number of line break tags </br> appended to the end of the table in order to generate whitespace between then end of the table and the subsequent element. By default, two line breaks are used.


The printing format is drawn from options()$dustpan_output and may take any of the values "console", "markdown", "html", or "latex"

The markdown, html, and latex output is returned via asis_output, which forces the output into the 'asis' environment. It is intended to work with Rmarkdown, and the tables will be rended regardless of the chunk's results argument. Currently, there is no way to to capture the code for additional post processing.

When asis = TRUE (the default), the output is returned via knitr::asis_output, which renders the output as if the chunk options included results = 'asis'. Under this setting, the table will be rendered regardless of the value of the results option. Using asis = FALSE returns a character string with the code for the table. This may be rendered in a markdown document via cat(print(x, asis = FALSE)) with the chunk option results = 'asis'. (If working with an Rnw file, the chunk option is results = tex). The only way to use the asis argument is with an explicit call to print.dust.


Benjamin Nutter


dust(lm(mpg ~ qsec + factor(am), data = mtcars))

pixiedust documentation built on May 30, 2017, 8:17 a.m.

Search within the pixiedust package
Search all R packages, documentation and source code