Learn R Programming

officedown (version 0.0.5.003)

rdocx_document: Convert to an MS Word document

Description

Format for converting from R Markdown to an MS Word document. The function comes also with improved output options. rdocx_document2 also supports cross reference based on the syntax of the bookdown package.

Usage

rdocx_document(mapstyles, base_format = "rmarkdown::word_document", ...)

rdocx_document2(...)

Arguments

mapstyles

a named list of style to be replaced in the generated document. list("Date"="Author") will result in a document where all paragraphs styled with stylename "Date" will be styled with stylename "Author".

base_format

a scalar character, format to be used as a base document for officedown. default to word_document but can also be word_document2 from bookdown

...

arguments used by word_document

Examples

Run this code
# NOT RUN {
skeleton <- system.file(package = "officedown",
  "rmarkdown/templates/word/skeleton/skeleton.Rmd")
file.copy(skeleton, to = "officedown.Rmd")
library(rmarkdown)
render("officedown.Rmd", output_file = "officedown.docx")
# }

Run the code above in your browser using DataLab