Setting up RStudio Portable Default R version

I did not need to touch the registry.

I first installed R portable and then R Studio portable, both from Sourceforge. After launching R Studio for the first time, I was shown the option of choosing the installation of R to be used, as shown in

https://support.rstudio.com/hc/en-us/articles/200486138-Using-Different-Versions-of-R

I browsed to branch \PortableApps\R-Portable\App\R-Portable\bin, where executables are located. There I selected the 64-bit version.

If you want to change later the version used, you open R Studio and go to Tools -> Option -> General -> R Version.

This avoids modifying the registry, with the two advantages of Portable Apps:

  1. Leaving no trace of the app in the system (or, at least, a much milder one).
  2. Being really portable (or, at least, much more so).

The link to R Portable above is a bit misleading. In order to run a portable version of R AND RStudio, you also need the 27MB portable RStudio here. What's even more confusing is that it has the same name as the RPortable file.

It took me a bit of time to figure that one out. Perhaps you could edit your question to point to both for those who wish for an IDE?

And, IMHO, it's not truly portable, because when you move from one machine to another you need to specify the R version on your USB drive and also the work directory. Pity.


On Windows, RStudio uses the system registry to find where installed versions of R are located. You'll need to edit the registry yourself to let it know about new versions. Fortunately you can do this in HKEY_CURRENT_USER so admin rights shouldn't be required. Here are the keys and values you'll want to write:

http://cran.r-project.org/bin/windows/base/rw-FAQ.html#Does-R-use-the-Registry_003f

More detail about how RStudio selects the R version to run here:

https://support.rstudio.com/hc/en-us/articles/200486138-Using-Different-Versions-of-R