Skip to main content

Section B.3 Creating an R Markdown File

When opening a new document, instead of clicking the button for R script, you are going to click the R Markdown button. Once you name it, you have three options to pick from as an output:
  1. HTML: Turns your R Markdown file into a website
  2. PDF: Turns your R Markdown file into a PDF
  3. Word: Turns your R Markdown file into a Microsoft Word document
In this chapter, we will use HTML as our output because it supports interactivity, easy sharing, and web-based reproducibility.
Once you click okay, a brand new R Markdown document has been created! If this is your first time looking at an R Markdown file, you’re probably thinking, "This looks sort of familiar, but there are some things that are different." Let’s break down the specific parts of an R Markdown file.