I'm using renv
i.e. for package management in R-projects. I cannot load packages from external sources. After a new R-Version was installed, I want to continue using the same packages in the new version as used in the old R-version.
Since renv
creates a new directory to store packages for the new R-version (e.g. .../renv/library/R-4.2/
), which contains only "base" packages installed with the new R-version, I want to "clone" the packages stored in the renv
environment of the old R-version (e.g. .../renv/library/R-4.1/
).
What is the best practice to simply use the same packages in the new R-version compared to the old R-version (without installing packages). Using renv::restore()
, renv
tries to newly install packages for the new R-version (and I don't want this). Can I simply "copy" the content of .../renv/library/R-4.1/
to .../renv/library/R-4.2/
? Does renv
provide options to simply keep using packages from "old R-versions" (here R-4.1) in "new R-versions" (here R-4.2)?