4

You can run multiple versions of R with RStudio Server Pro, and you can select which to run in a dropdown.

The open source edition does not have that ability to change R executables on the fly. That's find.

I just want to be able to pick somehow which of my installed R versions RStudio Server is using. This documentation says

If you are running RStudio within a web browser then the version of R is determined by whatever version of R is running alongside RStudio Server.

What does "alongside" mean? Is there a config file somewhere where I can give the path to the executable I want?

abalter
  • 766

2 Answers2

3

Yes you can specify which R version will be used by RStudio Server. Please see the section "Specifying R Version" from the RStudio Server: Configuring the Server.

By default RStudio Server runs against the version of R which is found on the system PATH (using which R). You can override which version of R is used via the rsession-which-r setting in the server config file. For example, if you have two versions of R installed on the server and want to make sure the one at /usr/local/bin/R is used by RStudio then you would use:

rsession-which-r=/usr/local/bin/R

Note again that the server must be restarted for this setting to take effect.

djhurio
  • 599
0

Just in case you happen to be using RStudio Server (open source) or someone is looking for how to change the RStudio Server default version of R, here is what I found when trying to answer the same question:

Starting in RStudio Server 1.3 (the newest version is 1.4.1106, released February 22, 2021), a user’s preferred version of R can be specified in the rstudio-prefs.json file in the global-level /etc/rstudio folder or in the user-level ~/.config/rstudio folder.

See https://blog.rstudio.com/2020/02/18/rstudio-1-3-preview-configuration/ and https://docs.rstudio.com/ide/server-pro/session-user-settings.html for user setting options in newer versions of RStudio Server.

See https://support.rstudio.com/hc/en-us/articles/200716783-RStudio-Release-History for RStudio release history and https://www.rstudio.com/products/rstudio/download-server/redhat-centos/ for Red Hat downloads of the newest version of RStudio Server.

Ted M.
  • 101