Best Practice for good documented reproducible analysis

I use rrtools for making my work well-documented and reproducible, and describe it a little more on another thread here: Data Science Project Template for R - #11 by benmarwick

To answer your specific questions:

How do you make sure, your code still runs when r-packages get updated?

rrtools uses Docker and MRAN to create an isolated computational environment with specific package versions. They do not change during the life of that project when I update the packages on my desktop version of R. We tried packrat but found it unreliable.

Do you use git for version control?

rrtools uses git and GitHub with public or private repos. This make collaboration very efficient, and is a nice backup.

When does it make sense to write a package?

Our view is that an R package is a suitable file structure to base a research compendium on because it is familiar to most R users, and there is already so much tooling available to automate package creation, testing, and use. So it's quite natural to bundle the the code and other files associated with a journal article or report in with an R package.

2 Likes