September 21, 2016

What is R Markdown?

R Markdown = R + Markdown

  • R Markdown is an authoring format that enables easy creation of dynamic documents, presentations, and reports from R.
  • Markdown is a text-to-HTML conversion tool to write quick HTML code

Flow

Here is the input/output flow

  1. R Markdown .Rmd file. R runs all code and generates all outputs, yielding an internally generated
  2. Markdown .md file. All Markdown code is formatted, yielding
  3. Either a
    1. HTML file
    2. PDF file
    3. Word file (yuck)

Example of Markdown

The most common example of a .md Markdown file is the README.md intro page to any GitHub repo. For example, the NY Times' iOS photo viewer:

  • Go to the repo page and look at the page
  • Click on README.md
  • Then click on RAW to see the Mardown source code

Resources