body_add_crosstable | R Documentation |
officer
documentbody_add_crosstable()
adds such a flextable
an officer
document.
body_add_crosstable(
doc,
x,
body_fontsize = NULL,
header_fontsize = ceiling(body_fontsize * 1.2),
padding_v = NULL,
allow_break = TRUE,
max_cols = 25,
...
)
doc |
a |
x |
a |
body_fontsize |
fontsize of the body |
header_fontsize |
fontsize of the header. Defaults to |
padding_v |
vertical padding of all table rows |
allow_break |
allow crosstable rows to break across pages |
max_cols |
max number of columns for |
... |
further arguments passed to |
The docx object doc
Dan Chaltiel
#Officer
library(officer)
mytable = crosstable(mtcars2)
doc = read_docx() %>%
body_add_crosstable(mytable) %>%
body_add_break %>%
body_add_crosstable(mytable, compact=TRUE)
dfile = tempfile(fileext=".docx")
print(doc, target = dfile)
if(interactive()) browseURL(dfile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.