R + Docker = Rocker

https://www.rocker-project.org/

In my mind, reproducibility is a really good thing – both for helping readers better evaluate the results that have been generated (e.g., for a paper) and as a way of providing others a computational means of solving a coding problem (i.e., example code to use or build on for other projects).

One challenge in reproducibility is the computing environment. That is, even with the same code, functions, packages (including versions), and data we are not guaranteed to get the same answer if a set of code were re-run by someone else due to potential operating system and environmental variable differences.

While I’ve heard of using Docker for making “images” that can then help with the above problem (though I have no idea how that really works, yet), I’ve only recently come across rocker. Apparently, rocker does some of the computational environmental setup work for us, in terms of generating a pre-made image with R and RStudio, as well as a bunch of pre-loaded packages (e.g., the tidyverse), already loaded. This image than then be used to generate the same results across multiple operating systems. I believe the images themselves are Linux-based, but don’t quote me on that.

So, I just wanted to share with you the above resource in case anyone was interested in providing that level of reproducibility. @Libby Megna, I thought this might be particularly interesting to you. I’ll probably end up going down this road for some of my projects, if for no other reason than to better understand some of the tools at my disposal, in which case I’ll try to relay my experiences to you all.