Comment by scrappyjoe
Comment by scrappyjoe 2 days ago
Doesn’t renv do that? What need does renv not meet for you?
Comment by scrappyjoe 2 days ago
Doesn’t renv do that? What need does renv not meet for you?
I had similar issues in the past. Setting up renv, everything seems good, but after working in a project for a few weeks and installing packages, renv constantly complains about the library being out-of-sync and resolving these complaints took way longer than new ones came around. I think renv has good intentions, but there are just too many edge cases (Bioconductor, installing an experimental package from Github, weird package dependencies etc.), that it always failed me in a real-world scenario.
Ultimately, you're right that `rv` and `renv` get you to the same spot, both create reproducible, isolated projects. `renv` has a few issues that we often hit that lead to `rv`.
`renv` is an iterative process of installing some packages, then snapshotting your project state, and then trying to reproduce. The time between the installation and snapshot can often lose information (think `install.packages("my_pkg", repos = "https://my-repo.com")`, your repo source is lost by time the snapshot occurs). You can also install incompatible versions over-time.
rv solves both of these problems because it will lock the source at the time of installation. Additionally, because it is declarative, we are able to resolve the full dependency tree before installing packages to ensure everything will be compatible.
While I am a big proponent of using rv, if renv fits your needs, then switching to rv may not be worth it. For our organization, we did have multiple issues with renv, so created a replacement for it that we hope others in the community will find useful to address their needs.