Intermediate R for reproducible scientific analysis

Intermediate lessons for researchers already familiar with R, but not programming concepts.

The goal of this lesson is to teach researchers already experienced with R some useful programming concepts that will make writing code more efficient, modular, and reusable, as well as packages for efficient data analysis.

A variety of third party packages are used throughout this workshop. These are not necessarily the best, nor are they comprehensive, but they are packages we find useful.

Note that this workshop will not cover statistics.


Be familar with RStudio, project creation, and variables, and the basic data structures and types in R.

Prequisite topics

The following topics are taught in the novice lessons and are expected knowledge for this workshop:

  1. Introduction to R and RStudio
  2. Project Management
  3. Seeking help
  4. Data structures
  5. Exploring Data Frames
  6. Subsetting data
  7. Vectorisation
  8. Writing data


Session 1 (~ 4 hours)

  1. Data.table
  2. Reshaping data
  3. For loops
  4. Apply functions
  5. Control flow

Session 2 (~ 3 hours)

  1. R markdown
  2. plyr
  3. Parallel for loops
  4. Functions
  5. Wrapping up

Optional lessons

  1. ggplot2

Other Resources