word_document

0th

Percentile

Convert to an MS Word document

Format for converting from R Markdown to an MS Word document.

Usage
word_document(fig_width = 5, fig_height = 4, fig_caption = FALSE,
  highlight = "default", reference_docx = "default", pandoc_args = NULL)
Arguments
fig_width
Default width (in inches) for figures
fig_height
Default width (in inches) for figures
fig_caption
TRUE to render figures with captions
highlight
Syntax highlighting style. Supported styles include "default", "tango", "pygments", "kate", "monochrome", "espresso", "zenburn", and "haddock". Pass NULL to prevent syntax highlighting.
reference_docx
Use the specified file as a style reference in producing a docx file. For best results, the reference docx should be a modified version of a docx file produced using pandoc. Pass "default" to use the rmarkdown default styles.
pandoc_args
Additional command line options to pass to pandoc
Details

R Markdown documents can have optional metadata that is used to generate a document header that includes the title, author, and date. For more details see the documentation on R Markdown metadata.

R Markdown documents also support citations. You can find more information on the markdown syntax for citations within the pandoc documentation on http://johnmacfarlane.net/pandoc/demo/example19/Citations.html{citations} and http://johnmacfarlane.net/pandoc/demo/example19/Footnotes.html{footnotes}.

Value

  • R Markdown output format to pass to render

Aliases
  • word_document
Examples
library(rmarkdown)

# simple invocation
render("input.Rmd", word_document())

# specify an option for syntax highlighting
render("input.Rmd", word_document(highlight = "zenburn"))
Documentation reproduced from package rmarkdown, version 0.5.1, License: GPL-3

Community examples

Looks like there are no examples yet.