An R reproducibility toolkit for the practical researcher

By Paola Corrales & Elio Campitelli in Workshop Education English

March 1, 2022

With considerable effort, you wrote R code to analyze your data and generate a final document or report to present the results. You then give the code to a colleague for them to evaluate it, they don’t know which packages they need to install, they don’t have the necessary data and they don’t know if the correct script is report_final.Rmd or report_final_final.Rmd. Even after your guidance, they find that the code does not run on their machine. Worse, when you try to run it yourself a few weeks later, you realize that a package update “broke” your code and now it doesn’t run.

This course will help you avoid those issues. You will learn how to organize a project to speed up collaboration and maximize its reproducibility by leveraging existing tools in the R ecosystem –such as RMarkdown, renv, and others–, version control and working environments.

This course is intended for researchers, data scientists, and anyone who uses R to generate documents and who wants to collaborate with other people (or themselves in the future) with the minimum amount of pain possible. Basic prior experience with R is recommended. If you have ever read data and generated a graph or table based on it, you have everything you need to participate.

We’ve also included this notes for instructors in case you are interested in teaching it.