write_and_open | R Documentation |
officer
print() function. Write the file and try to open it right away.As it tests if the file is writable, this function also prevents officer:::print.rdocx()
to abort the RStudio session.
write_and_open(doc, docx.file)
doc |
the docx object |
docx.file |
the name of the target file. If missing or NULL, the doc will open in a temporary file. |
Nothing, called for its side effects
Dan Chaltiel
library(officer)
library(crosstable)
mytable = crosstable(mtcars2)
doc = read_docx() %>%
body_add_crosstable(mytable)
write_and_open(doc)
## Not run:
write_and_open(doc, "example.docx")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.