Using R and RStudio within OnDemand

Using R and RStudio within OnDemand

Goal: Detail the process of using R and RStudio via the OnDemand service.



What is RStudio

RStudio Desktop: Used by millions of people weekly, the RStudio integrated development environment (IDE) is a set of tools built to help you be more productive with R and Python.

Since this is a desktop GUI application, you will need to run this from ARCC’s OnDemand service, via an interactive desktop.


Start R and RStudio

Process:

  1. Go to OnDemand

    1. Begin an interactive desktop by clicking on the Medicinebow XFCE Desktop App.

       

    2. Fill out the webform then click the button to launch your session

       

  2. Open up a terminal

    4Terminal.png
  3. Load R and any related dependencies - Ex: module load gcc/14.2.0 r/4.4.0 rstudio

  4. Load RStudio by calling it from the command line - Ex: rstudio

  5. If started successfully, an R-Studio GUI window should launch within your OnDemand XFCE Desktop session.

If you forget to load a version of R, then you’ll see an error of the form:

RStudio requires a version of R to be available, so a version of R must be loaded before trying to start RStudio.

image-20240702-145101.png
Error if R not found.