Installing multiple versions of R on macOS

I used to use RSwitch to manage multiple versions of R on macOS. I had to wipe my computer recently, so I am starting from scratch. In the past, when I ran the .pkg installer, it would install that version in /Library/Frameworks/R.framework/Versions/X.Y/. The other versions would remain untouched. Now, it removes the other versions. Is this a new behavior of either the R installer or macOS? Is there a way to turn it on/off?

Update:

The proper solution is to use pkgutil --forget to keep previous versions. I noticed that the .pkg installer explicitly states this at the beginning:
pkgutil

I definitely did not see this before and have not even heard of pkgutil. I am still not sure what allowed me to skip this step previously.

1 Like

This may not solve the issue with RSwitch but you could give https://github.com/r-lib/rig a try. This is a relatively new tool that allows you to set up multiple R versions, too.

2 Likes

I have not heard of rig. Looks very interesting. It doesn't directly answer my question, but it would completely bypass the whole problem.

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