Reproducible Research using R

Audience Computational Skills Prerequisites Duration
Anyone Beginner/Intermediate R Working knowledge of R/RStudio 3 hour workshop


This repository has teaching materials for a 3 hour, hands-on Reproducible Research using R workshop led at a relaxed pace.

Reproducible research is as important for computational analysis as it is at the bench. Integrating your R data analyses into a report format allows for easy retrieval of the packages/versions and code used to generate your results and figures. It allows for efficient communication of your results with your collaborators. The knitr R package allows for the easy generation of professional reports for any R analysis, while allowing for customization and easy revision. In this 3-hour workshop, we will cover the simple RMarkdown syntax and explore options for customizing your reports.

Learning Objectives

These materials are developed for a trainer-led workshop, but also amenable to self-guided learning.


Lessons Estimated Duration
Introduction to RMarkdown and report generation with the knitr package 120 min

Setup and Installation Requirements

Download the most recent versions of R and RStudio for your laptop:

Install the required R package by running the following code in RStudio:



Load the libraries to make sure the packages installed properly:



These materials have been developed by members of the teaching team at the Harvard Chan Bioinformatics Core (HBC). These are open access materials distributed under the terms of the Creative Commons Attribution license (CC BY 4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.