How to properly use Renv inside Software Development

Hi guys,

it's time for another R related question. Some time ago I was pretty sure that the renv package is exactly what I'm looking for to have multiple local R installations and share package versions among developers.

In the development phase, this works as desired. However, from time to time we create new releases of our packages and commit them to our package manager. This way, another package can simply call install.packages("packageA") and the package will be installed properly. However, it seems that the renv.lock of the packageA or more precisely the included dependency versions contained in the renv.lock are completely ignored. The installation process simply installs the latest versions of the dependencies that are available on the package manager.

The only thing that provides some sort of access control on the version of the dependencies is the DESCRIPTION file of the package, where it is recommended to specify a version only in the form of >= and not ==.

However, without using the renv package, all my packages must use the same versions of dependencies. Honestly, I haven't much experience with building large software projects, however, I guess it is pretty normal that newer versions of packages sometimes replace older functionality. So, when a new version of a package is installed, it might lead to a crash in packages that rely on older version. Or is it best practice to not replace functionality but rather extend it in newer versions?

Do you have any experience in this regard that you would like to share?

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.