In short, a library is just a directory containing installed packages
- Hadley Wickham, R Packages
You can view your current libraries using:
For the purpose of reproducible environments, a library is the unit we ultimately want to reproduce. R libraries are subject to a few constraints that must be understood to reproduce them:
- Only 1 version of each R package can be installed and accessed in a library at a time.
- R packages have complex dependency relationships, a working library must have a consistent set of packages that work together
- An R library is tied to a specific version of R.
- R can search through multiple libraries, and libraries can be shared across projects and users.
Addressing these constraints is the focus of the reproducible strategies.