Doing reproducible research with R Markdown

Since the concepts and methods of reproducible research have their own range of topics that could easily fill several books, we would like to focus on the abilities of R Markdown in conjunction with RStudio in this chapter. But first, we will give you a few introductory statements.

What is Markdown?


Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write, using an easy-to-read, easy-to-write plain text format, and then convert it to structurally valid XHTML (or HTML).

 --John Gruber, Creator of Markdown (

This simplification, and the fact that it is akin to the markup language, enables authors to perform a fast and intuitive ...

Get Mastering RStudio – Develop, Communicate, and Collaborate with R now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.