# NOT RUN {
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")
# }
Run the code above in your browser using DataLab