Using different version of R per user in Rstudio Server
Asked Answered
A

3

6

I am using an Rstudio Server (0.98.490) on a CentOS machine, that uses the default installation in the machine which is an older version of R. I also have a newer version of R compiled elsewhere in the system. Can I, as a non-root user, tell Rstudio to use the new installation instead of the old one when I start a session?

Agamemnon answered 9/8, 2016 at 2:44 Comment(0)
K
2

Starting in RStudio Server 1.3 (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.

Killebrew answered 20/4, 2021 at 14:43 Comment(0)
B
0

I'm not sure if there are any peculiarities for CentOS, but I believe you should be able to change your ~/.profile or ~/.bash_profile file to include the following line: export RSTUDIO_WHICH_R=/path/to/desired/compiled/R.

You can see which version of R RStudio is currently running by entering which R into a terminal. the export command listed above should change it to your desired build.

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

Running newer version of R from terminal when older version is invoked by default

Hope this helps

Bicyclic answered 9/8, 2016 at 7:35 Comment(1)
any clue how to make this happen with R.app (environment/shell)?Appreciable
O
0

The first answer was relevant RStudio, not rstudio-server as the question asks. The question is addressed in the section "RStudio Desktop and RStudio Server Open-Source".

However, adding a line like export RSTUDIO_WHICH_R=/usr/local/bin/R to my ~/.profile and ~/.bash_profile does not actually seem to affect rstudio-server for me. So I am giving up for now. The Pro version seems to have other options, as listed here.

Orten answered 2/2, 2018 at 20:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.