Learn R Programming

rmarkdown (version 0.1.2)

beamer_presentation: Convert to a Beamer presentation

Description

Format for converting from R Markdown to a Beamer presentation.

Usage

beamer_presentation(toc = FALSE, slide_level = NULL, incremental = FALSE,
  fig_width = 10, fig_height = 7, fig_crop = TRUE, fig_caption = FALSE,
  theme = "default", colortheme = "default", fonttheme = "default",
  highlight = "default", template = "default", includes = NULL,
  data_dir = NULL, pandoc_args = NULL)

Arguments

toc

TRUE to include a table of contents in the output (only level 1 headers will be included in the table of contents).

slide_level

The heading level which defines indvidual slides. By default this is the highest header level in the hierarchy that is followed immediately by content, and not another header, somewhere in the document. This default can be overridden by specifying an explicit slide.level.

incremental

TRUE to render slide bullets incrementally. Note that if you want to reverse the default incremental behavior for an individual bullet you can preceded it with >. For example: > - Bullet Text

theme

Beamer theme (e.g. "AnnArbor").

colortheme

Beamer color theme (e.g. "dolphin").

fonttheme

Beamer font theme (e.g. "structurebold").

fig_crop

TRUE to automatically apply the pdfcrop utility (if available) to pdf figures

highlight

Syntax highlighting style. Supported styles include "default", "tango", "pygments", "kate", "monochrome", "espresso", "zenburn", and "haddock". Pass NULL to prevent syntax highlighting.

template

Pandoc template to use for rendering. Pass "default" to use the rmarkdown package default template; pass NULL to use pandoc's built-in template; pass a path to use a custom template that you've created. See the documentation on pandoc templates for more details.

fig_width

Default width (in inches) for figures

fig_height

Default width (in inches) for figures

fig_caption

TRUE to render figures with captions

includes

Named list of additional content to include within the document (typically created using the includes function).

data_dir

Additional directory to resolve relatives paths of templates and included content against (the directory of the input file is used by default).

pandoc_args

Additional command line options to pass to pandoc

Value

R Markdown output format to pass to render

Details

Creating Beamer output from R Markdown requires that LaTeX be installed.

For more information on markdown syntax for presentations see producing slide shows with pandoc.

R Markdown documents can have optional metadata that is used to generate a document header that includes the title, author, and date. Metadata can also be provided to enable the use of footnotes and bibliographies. For more details see the documentation on R Markdown metadata and citations.

Examples

Run this code
# NOT RUN {
library(rmarkdown)

# simple invocation
render("pres.Rmd", beamer_presentation())

# specify an option for incremental rendering
render("pres.Rmd", beamer_presentation(incremental = TRUE))
# }

Run the code above in your browser using DataLab