powered by
officer
As it tests if the file is writable, this function also prevents officer:::print.rdocx() to abort the RStudio session.
officer:::print.rdocx()
write_and_open(doc, docx.file)
Nothing, called for its side effects
the docx object
the name of the target file. If missing or NULL, the doc will open in a temporary file.
Dan Chaltiel
library(officer) library(crosstable) mytable = crosstable(mtcars2) doc = read_docx() %>% body_add_crosstable(mytable) write_and_open(doc) if (FALSE) { write_and_open(doc, "example.docx") }
Run the code above in your browser using DataLab