tblDown | R Documentation |
Write a data frame or a list of data frames in a markdown document converted #' in various format using pandoc.
tblDown( x, output_file = "./tables.docx", section = NULL, caption = NULL, title = NULL, row.names = FALSE, ... )
x |
a data frame or a list of data frames. |
output_file |
path to the output file. Its extension will be used by pandoc to correctly render the final document in the write format. |
section |
a vector of character strings used as section titles (optional). |
caption |
a vector of character strings used as captions (optional). |
title |
a character string used as a title for the document (optional). |
row.names |
a logical. Should row names be added? See |
... |
further arguments passed to |
This function calls base::cat()
and knitr::kable()
to write a Markdown
document containing a list of tables that is then converted into the
desired format. For section
and caption
if the length differ then
will be cut off or expanded.
A data frame whose columns have the desired classes.
https://pandoc.org/MANUAL.html#tables
## Not run: data(CO2) tblDown(list(CO2[1:2, ], CO2[3:6,]), section = "section") tblDown(list(CO2[1:2, ], CO2[3:6,]), "./tables.pdf") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.