powered by
add a table into an rdocx object
body_add_table(x, value, style = NULL, pos = "after", first_row = TRUE, first_column = FALSE, last_row = FALSE, last_column = FALSE, no_hband = FALSE, no_vband = TRUE)
a docx device
a data.frame
table style
where to add the new element relative to the cursor, one of "after", "before", "on".
logical for Word table options
library(magrittr) doc <- read_docx() %>% body_add_table(iris, style = "table_template") print(doc, target = "body_add_table.docx" )
Run the code above in your browser using DataLab