Welcome to the {renv} Tutorial!
Tutorial Overview
This self-paced tutorial is intended to take 1-2 hours to complete, depending on your previous familiarity with the theoretical and programming components of dependency management and R. Content has been written with novice R users in mind, but this tutorial (hopefully) provides useful information on setting up reproducible computational environments for R users of any skill level.
The tutorial is split into the following sections:
- Background introduces a simplified definition and reasoning for reproducibility, its relation to managing software dependencies, and some of the nuances of dependencies in R.
- {renv} discusses the main functions of the {renv} package, and just enough of the underlying mechanics of the package to be useful. You can jump to this section if you don’t have time for the background.
- Exercises contains a handful of practical exercises that walk users through the main components of using {renv}, and highlights some common mistakes or issues users might encounter.
- Optional Content dives into some of the more technical details of {renv}, caching, and related topics. This section is only recommended for users with more advanced use cases or troubleshooting needs.
This tutorial assumes you have the following software installed:
- R, recommend v4.4.X or more recent
- RStudio
- {renv}, installed with
install.packages("renv")
from within R
Although optional for the general content in this tutorial, knowledge of git and GitHub will be helpful for the exercises especially if you would like to receive feedback or troubleshoot issues remotely. Check out our git and GitHub tutorial if needed!