Learn R Programming

rmarkdown (version 2.28)

rtf_document: Convert to an RTF document

Description

Format for converting from R Markdown to an RTF document.

Usage

rtf_document(
  toc = FALSE,
  toc_depth = 3,
  number_sections = FALSE,
  fig_width = 5,
  fig_height = 4,
  keep_md = FALSE,
  md_extensions = NULL,
  pandoc_args = NULL
)

Value

R Markdown output format to pass to render

Arguments

toc

TRUE to include a table of contents in the output

toc_depth

Depth of headers to include in table of contents

number_sections

TRUE to number section headings

fig_width

Default width (in inches) for figures

fig_height

Default height (in inches) for figures

keep_md

Keep the markdown file generated by knitting.

md_extensions

Markdown extensions to be added or removed from the default definition of R Markdown. See the rmarkdown_format for additional details.

pandoc_args

Additional command line options to pass to pandoc

Details

See the online documentation for additional details on using the rtf_document format.

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 in the Bibliographies and Citations article in the online documentation.

Examples

Run this code
if (FALSE) {

library(rmarkdown)

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

# specify table of contents option
render("input.Rmd", rtf_document(toc = TRUE))
}

Run the code above in your browser using DataLab