Description Usage Arguments Value Examples
Export flextable objects or ggplot2 figures into a Word document
1 2 |
filename |
the name of the target Word document to create |
tables |
a named list of flextable objects |
tables_title |
a named list of table titles. The names should correspond to those of tables parameter |
figures |
a named list of |
figures_title |
a named list of figure titles. The names should correspond to those of figures parameter |
base_docx_filename |
the name of another Word file to inherit data from |
The message in console in case of successful Word document creation
1 2 3 4 5 6 7 8 9 10 11 12 | #export simple flextable objects
t_flx_obj <- CreateFLX(list(data = mtcars[1:8,]))
t_flname <- paste0(getwd(), "/test_table.docx")
DocExport(filename = t_flname,
tables = list(table1 = t_flx_obj),
tables_title = list(table1 = "Test table"))
t_flx_obj_sec <- CreateFLX(list(data = mtcars[9:16,]))
t_flname_sec <- paste0(getwd(), "/test_table_second.docx")
DocExport(filename = t_flname_sec,
tables = list(table2 = t_flx_obj_sec),
tables_title = list(table2 = "Test table second"),
base_docx_filename = t_flname)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.