Output formats

These output formats can be specified in your document’s YAML frontmatter. Each output format has different arguments available which you can see in their respective docs; to view the available arguments in your R console, for html_document for example, you may use str(rmarkdown::html_document()).

beamer_presentation()

Convert to a Beamer presentation

ioslides_presentation()

Convert to an ioslides Presentation

powerpoint_presentation()

Convert to a PowerPoint presentation

slidy_presentation()

Convert to a slidy presentation

github_document()

Convert to GitHub Flavored Markdown

html_document()

Convert to an HTML document

md_document()

Convert to a markdown document

odt_document()

Convert to an OpenDocument Text (ODT) document

pdf_document() latex_document() latex_fragment()

Convert to a PDF/LaTeX document

rtf_document()

Convert to an RTF document

word_document()

Convert to an MS Word document

html_vignette()

Convert to an HTML vignette

tufte_handout()

Tufte handout format (PDF)

html_notebook()

Convert to an HTML notebook

html_fragment()

Convert to an HTML fragment.

Rendering documents

These functions can be used to render or “compile” an R Markdown document.

compile_notebook

Compiling R scripts to a notebook

render()

Render R Markdown

render_delayed()

Delay Rendering for an Expression

render_site() clean_site() site_generator() site_config() default_site_generator()

Render multiple documents as a website

render_supporting_files()

Render supporting files for an input document

Helper functions

These functions are useful when working with R Markdown documents.

draft()

Create a new document based on a template

find_external_resources()

Find External Resource References

includes() includes_to_pandoc_args()

Include content within output

metadata

The YAML metadata of the current R Markdown document

paged_table()

Create a table in HTML with support for paging rows and columns

relative_to()

Relative path utility function

knit_params_ask()

Run a shiny application asking for parameter configuration for the given document.

HTML notebooks

Functions for parsing and generating output for the html_notebook output format.

html_notebook_metadata()

Generate R Notebook Metadata

html_notebook_output_html() html_notebook_output_img() html_notebook_output_png() html_notebook_output_code()

Generate R Notebook Output

parse_html_notebook()

Parse an HTML Notebook

convert_ipynb()

Convert a Jupyter/IPython notebook to an R Markdown document

R Markdown websites

Functions for rendering collections of R Markdown documents as a website. Note that extension packages like bookdown, blogdown, and distill also render multiple R Markdown files.

render_site() clean_site() site_generator() site_config() default_site_generator()

Render multiple documents as a website

site_resources()

Determine website resource files for a directory

Interactive documents

These functions add interactivity to R Markdown documents by adding reactive components made with Shiny.

shiny_prerendered_chunk()

Add code to a shiny_prerendered context

shiny_prerendered_clean()

Clean prerendered content for the specified Rmd input file

run()

Run a Shiny document

Pandoc

pandoc_variable_arg() pandoc_include_args() pandoc_highlight_args() pandoc_latex_engine_args() pandoc_toc_args()

Functions for generating pandoc command line arguments

pandoc_available() pandoc_version()

Check pandoc availability and version

pandoc_citeproc_convert()

Convert a bibliograpy file

pandoc_convert()

Convert a document with pandoc

pandoc_exec()

Get the path of the pandoc executable

pandoc_options()

Pandoc options for an output format

pandoc_path_arg()

Transform path for passing to pandoc

pandoc_self_contained_html()

Create a self-contained HTML document using pandoc.

pandoc_template()

Render a pandoc template.

Customizing & extending output formats

all_output_formats()

Determine all output formats for an R Markdown document

default_output_format()

Determine the default output format for an R Markdown document

html_dependency_jquery() html_dependency_jqueryui() html_dependency_bootstrap() html_dependency_tocify() html_dependency_font_awesome() html_dependency_ionicons() html_dependency_pagedtable() html_dependency_highlightjs()

Provide common HTML dependencies for R Markdown formats

latex_dependency_tikz()

Provide common LaTeX dependencies

latex_dependency()

Define a LaTeX package dependency

html_document_base()

Base output format for HTML-based output formats

knitr_options()

Knitr options for an output format

knitr_options_html()

Knitr options for an HTML output format

knitr_options_pdf()

Knitr options for a PDF output format

output_format()

Define an R Markdown output format

output_metadata

The output metadata object

resolve_output_format()

Resolve the output format for an R Markdown document

rmd_metadata

R Markdown Metadata

rmarkdown_format() from_rmarkdown()

R Markdown input format definition