Link Search Menu Expand Document

1. Introduction to R Markdown

1.1 What is R Markdown?

“… an authoring framework for data science …

  • save and execute code
  • generate high quality reports …”

R Markdown Lessons from R Studio

It combines code, output, and text in a single file, which can be rendered to various formats such as HTML, PDF, Word, and more.

Let’s look at the Tufte Handout example from the R Markdown Gallery.

1.2 Why is R Markdown useful?

  • Communication: easy to share your results with others.

  • Reproducibility: easy to reproduce your analysis and results at a later time.

  • Efficiency: easy to update reports with new data or changes to your analysis.

  • Flexibility: a wide range of customization options.

  • Integration: can be used with a variety of other tools and packages, such as Shiny, to create interactive documents that allow users to interact with the data.


1.3 When is RMarkdown not the best choice?

  • Data Cleaning: Code is long and probably messy. Clean the data in a regular .R file and then move to RMarkdown after


This page is meant to introduce R Markdown briefly, what it is and why it is useful.
A pause here for questions.