print.dust | R Documentation |
dust
TableApply 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)
x |
An object of class |
... |
Additional arguments to pass to the print method. Currently ignored. |
asis |
A logical value that controls if the output is printed using
|
linebreak_at_end |
Used only in HTML tables; defines the number of
line break tags |
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 rendered 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.