YAML

Ranae Dietzel and Andee Kaplan

YAML Ain’t Markup Language

R markdown output formats

Documents

Interactive R Notebooks, HTML, PDF, Microsoft Word (docx), OpenDocument Text, Rich Text Format, Markdown

Presentations

HTML presentation with ioslides, reveal.js, W3C Slidy (and more), and PDF presentation with LaTeX Beamer

More

Interactive dashboards, R package vignette, books, websites, and interactive documents.

Your turn

Come up with a list of 5 things you wish you could do with R markdown (formatting or otherwise).

R markdown flexibility

Each output type has its own flexible options to customize your document. For example:

YAML

We control all of these options with YAML front-matter. YAML is a human friendly data serialization standard for all programming languages.

The YAML header is surrounded by ---s, and is at the beginning of the document.

Available options

You can go to rmarkdown.rstudio.com and find out all the available YAML options for the default document types in R markdown.

If you create your own templates, you can make your own options! For example, you may want to create a template for a journal submission [example].

Your turn

Navigate to rmarkdown.rstudio.com and look up how to specify your 5 wishes and implement them in a R markdown document.

Hint: Think about what type of document you want first.

If you don’t have a wish list, try mine (PDF Document):

  1. Table of contents
  2. Numbered sections
  3. Allow figure captions
  4. Set default figure size to 4in by 3in
  5. Set margins to 1in