Switching R versions in RStudio Server (open source)

I am new to R, RStudio, RStudio Cloud, and RStudio Server. I recently tried fitting a neural net and svm models on my mac using RStudio Desktop. The process quickly overwhelmed my mac. I then tried using RStudio Cloud and did not see a lift in performance. It turns out that we only get 1 core per user. I then decided to launch RStudio Server on Amazon AWS.

I was able to install RStudio Server on an EC2 instance (CentOS) on Amazon AWS. AWS has a default version of R that you can install (R 3.4.1), which I did. I decided to to upgrade to R 3.6.0. I was able to install the newer version on R on the server. Now, I am attempting to tell the server to stop using the old version and start using the new version. I have looked at the documentation for managing the RStudio Server and found that you can use the command "rsession-which-r=/usr/bin/R" to update the setting in the server config file.

I have attempted to execute this command through a ssh connection to the server and also via the terminal in RStudio to no avail. I keep getting the prompt "No such file or directory". Below is a screenshot from the ssh session into the server:

14%20PM

I would greatly appreciate any advice you can give me to address this issue. I am just trying to switch between the versions of R I have installed on RStudio Server.

I don't use CentoOS myself but I think it also uses init.d files, so if you have one for RStudio you can modify your PATH there and make RStudio to use another R version (I can do this on Debian).

sudo nano /etc/init.d/rstudio-server
# PATH=/usr/local/bin/:/sbin:/usr/sbin:/bin:/usr/bin

This command needs to be placed in a server configuration file, not run in a terminal. Add it to /etc/rstudio/rserver.conf using a text editor like vi or nano.

Thanks for the recommendation! I am new to all of this. I have been looking for a tutorial/instructions on how to update the server config file as you recommended. Rstudio Server Config documentation also states that you place the command in the config file, but it does not tell me how to do it. I would greatly appreciate it if you could point me to the right documentation!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.