11.1 Introduction

R Markdown provides a unified authoring framework for data science, combining your code, its results, and your data in one computational environment. R Markdown documents are fully reproducible and support dozens of output formats, like PDFs, Word files, slideshows, html and more.

R Markdown files are designed to be used in three ways:

  • For communicating to decision makers, who want to focus on the conclusions, not the code behind the analysis.

  • For collaborating with other data scientists (including future you!), who are interested in both your conclusions, and how you reached them (i.e., the code).

  • As an environment in which to do data science, as a modern day lab notebook where you can capture not only what you did, but also what you were thinking.