For Python I'm able to use Pyenv within the terminal to install and manage different python versions, from which I can create virtual environments for use in projects.
With R I am able to use renv to create an R environment, but I don't know how to go about installing and manging different versions of R itself from the terminal.
I'm on mac os - but expect the solution to work for either mac or Linux.
Similar questions
I appreciate there are questions similar to this, what I've seen are the following and aren't suitable for my issue:
- How to install and manage multiple versions of R is old, and is about when there's no root access (I have root access)
- How to manage different versions of R on Mac? is mac specific, and seems to require using some GUI tool, whereas I would like to be able to manage things from the shell.