Overview

In order to make your analysis pipeline transparent and reproducible, in this class you’ll use R Markdown and Knitr to wrap up all your code and outputs (figures, tables, etc) together in a dyanmic document that can be placed in your lab notebook or published as a supplementary file in your manuscript.

Goals

  • learn the basics of Rmarkdown and dynamic documents
  • learn how to construct a basic R markdown document
  • use the ‘essential’ code chunks from the course to populate an Rmarkdown report
  • make a flexdashboard the incorporates graphics and code

Code

Rmarkdown_template.Rmd - a skeletal template that you can fill out with the code ‘essentials’ that we covered in class.

Rmarkdown_essentials.Rmd - same template as above, but already filled in with essentials

flexdashboard_essentials.Rmd - a different style of Rmarkdown that puts the focus on creating a dashboard of graphics. Particularly powerful when combined with the interactive graphs we produced during the course.

Reading

Blog post on Knitr by Karl Broman

Other examples of markdown in action

Supplementary code file from a recent Nature Immunology paper

Supplementary code file from my lab’s recent transcriptome paper.

Make your own CV in markdown - uses the Vitae and Scholar packages in R.

This course website - Each page on the course website is just a simple markdown document.