RStudio

RStudio

RStudio is an integrated development environment (IDE) for R, a programming language for statistical computing and graphics. It is available in two formats:

  • RStudio Desktop, a regular desktop application that most users are familiar with on their laptops, desktops or workstations.

  • RStudio Server runs on a remote server and allows accessing RStudio using a web browser.

On Sol, RStudio Server is available through Open On Demand based HPC Portal.

Available Versions

The following R versions are supported on RStudio

  • R 3.5.3

  • R 3.6.3

  • R 4.0.2

  • R 4.0.3

  • R 4.1.2

Usage

  • Login to the HPC Portal

  • Click the Interactive Apps dropdown and select RStudio Server

  • Choose the version of R, resources required to run your job, and click the submit button

  • When resources are available, OOD will launch RStudio Server on the compute node. This may take a few minutes.

  • Click the Connect to RStudio Server button, to launch RStudio in a new browser tab.

  • When you are done, click File>Quit Session to close your session.

    • You will be provided an option to save or discard changes to the .RData file

  • Close the tab, go back to the OOD dashboard and  click “My Interactive Sessions”

  • Click the delete button to close the RStudio session.

 

List of R Packages

Running a server requires a daemon to be always running consuming resources that could be used for running simulations. RStudio Server and the underlying R packages are bundled together in a singularity container. Requests for adding or removing R packages will only be accepted when new versions of R/RStudio are made available. 

Need access to these packages outside RStudio?

If you need to use these packages in a batch R program rather than RStudio, then you need to run R from the singularity container. Add the following two lines to your submit script to modify your MODULEPATH variable (assuming R 4.02. base module)

module use --append /share/Apps/share/Modules/lmod/singularity module load rstudio/r-4.0.2-base singularity run --app Rscript ${RSTUDIO_SERVER_IMAGE} <options> OR singularity run --app R ${RSTUDIO_SERVER_IMAGE} <options> OR singularity exec ${RSTUDIO_SERVER_IMAGE} R <options> OR singularity exec ${RSTUDIO_SERVER_IMAGE} Rscript <options>
This example uses the old TCL modules [alp514.sol-a101](1000): module use --append /share/Apps/share/Modules/modulefiles/singularity [alp514.sol-a101](1001): module av rstudio ----------------------------------------------------------------- /share/Apps/share/Modules/modulefiles/singularity ----------------------------------------------------------------- rstudio/r-3.5.3 rstudio/r-3.6.3 rstudio/r-4.0.2-base rstudio/r-4.0.2-bio rstudio/r-4.0.2-geo [alp514.sol-a101](1002): module load rstudio/r-4.0.2-base [alp514.sol-a101](1003): singularity run --app Rscript ${RSTUDIO_SERVER_IMAGE} -e "nrow(as.data.frame(installed.packages()[,1]))" [1] 608 [alp514.sol-a101](1004): module swap rstudio/r-4.0.2-base rstudio/r-4.0.2-bio [alp514.sol-a101](1005): singularity run --app R ${RSTUDIO_SERVER_IMAGE} -e "nrow(as.data.frame(installed.packages()[,1]))" R version 4.0.2 (2020-06-22) -- "Taking Off Again" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. [Previously saved workspace restored] > nrow(as.data.frame(installed.packages()[,1])) [1] 719 > > [alp514.sol-a101](1006): module swap rstudio/r-4.0.2-bio rstudio/r-4.0.2-geo [alp514.sol-a101](1007): singularity exec ${RSTUDIO_SERVER_IMAGE} Rscript -e "nrow(as.data.frame(installed.packages()[,1]))" [1] 901