Output Formats
You can create many types of output from a single .Rmd file. R Markdown has built in support for HTML, PDF, MS_Word, ODT, RTF, Markdown, and Github flavored Markdown documents; Beamer, slidy.js, ioslides, and reveal.js slideshows; and websites, dashboards, books, handouts, package vignettes, and Shiny apps. These formats can be specified in metadata, for example:
---title: "Sample Document"output: pdf_document---And you can set sub-options to customize each formats:
---title: "Sample Document"output: pdf_document: toc: true highlight: zenburn---Multiple formats can be specified in metadata:
---title: "Sample Document"output: html_document: toc: true theme: united pdf_document: toc: true highlight: zenburn---If you are using rmarkdown::render then you can pass a format name to render to select from the available formats. For example:
render("input.Rmd", "pdf_document")You can also render all formats defined in an input file with:
render("input.Rmd", "all")