Explanation: Renv configurationSource:
Rhino relies on renv to manage the R package dependencies of your project. With renv you can create an isolated package library for each application and easily restore it on a different machine using the exact same package versions. This is crucial for the maintainability of any project.
To learn more about renv visit its website. This article describes the specifics of how Rhino uses renv assuming some basic familiarity with the package.
renv offers different snapshot types. By default it performs an implicit snapshot: it tries to detect the dependencies of your project by scanning your R sources. While convenient in small projects, this approach lacks fine control and can be inefficient in larger code bases.
It would be preferable to use explicit snapshots: the
dependencies of your project must be listed in a
DESCRIPTION file. Unfortunately we faced some issues with
this snapshot type in deployments. Instead, Rhino uses the following
- Implicit snapshot (configured in
dependencies.Rfile with dependencies listed explicitly as
.renvignorefile which tells renv to only read
This solution offers us the benefits of explicit snapshots (fine control, efficiency) and works well in deployment.
For practical instructions on managing R package dependencies in Rhino check out the How-to: Manage R dependencies article.