renv R version usage

When using renv, the file renv.lock includes the version of R.

If someone tries to reproduce the environment but doesn't have that specific version of R installed, how does renv manage this ?

Thanks !

I would expect it to inform the user but I honestly don't know.
Why not experiment?
Make a small project with renv as an example.
Manually edit the renv.lock so that the version number is lower than your actual version (or higher?) And see what happens...

I was going to test it but thought that by posting here, I might get more info (if it's an upcoming feature for example or any other piece of info that might be useful). Going to test and post the result. Thanks

I think the answer is that you get a warning message:

Warning message:
Project requested R version '3.6' but '4.0.2' is currently being used

and it carries on to install the packages of the existing R version and not the one in the renv.lock.

pipenv makes use of pyenv to have multiple envs with the possibility of having a different version of python interpreter in each one of them. Maybe we need an additional tool like pyenv in the future (maybe it exists already and I'm just not aware of it)

To confirm, right now all renv does is print a warning. Note that different versions of R will get their own unique project library paths, so it's possible to use a new version of R without clobbering packages associated with different versions of R.

This topic was automatically closed 7 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.