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?
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.
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
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.
© 2022 - 2024 — McMap. All rights reserved.