RStudio

Overview

RStudio is a user interface and development environment for R, the statistical computing environment.

Restrictions on use

There are no access restrictions as it is free and open source software (AGPLv3 license)

Set up procedure

Load the modulefile according to how you are accessing the system and the version of Rstudio and R required (the R modulefile for the version indicated in the table will be loaded automatically):

PLEASE NOTE: See the iCSF R page for versions of R which could possibly be used with the -any-r Rstudio modulefiles listed below.

  • Rstudio 2024.09.0-any-r OR Rstudio 2024.04.2-any-r [RECOMMENDED] (for suitable versions of R modulefiles, which must be loaded before the R studio modulefile, please see the R page.)
    # Firstly, load an R modulefile
    module load apps/gcc/R/x.y.z                      # See the R page for available versions of R
                                                      # Latest is: apps/gcc/R/4.4.1
    
    # Secondly, load one of the following rstudio modulefiles
    module load apps/binapps/rstudio/2024.09.0-any-r  # New October 2024
    
    module load apps/binapps/rstudio/2024.04.2-any-r  # Mac users: this has been tested and works
                                                      # on at least MacOS 13.6.4 with X2GO or
                                                      # direct "ssh -X incline2000"
    

    To test whether Rstudio is working and can display fonts in a plot, please try a simple example inside RStudio by running the command:

    # This will only work if you've loaded a newer R modulefile recommended for the iCSF.
    # At the R > prompt in rstudio, run this command:
    source(file.path(Sys.getenv("REXAMPLE"), "vehicles.R"))
    

    Note that to make fonts work when using a Macbook, we have added the following line to the R code – you may need to use this in your own code:

    options(bitmapType='cairo')
    

    See the R Hints and Tips section for an example R script that will display and graph with labels. We have tested that this works on Macbooks!

In newer versions of RStudio, there are some architectural changes implemented which prevents users from browsing/selecting paths outside users home directory, if the default settings are not modified.
To enable this functionality, go to:

Tools > Global Options

In the General section of the window that appears, click on Advanced tab.

Under that menu, put a check mark in front of the line that says:
Use native file and message dialog boxes

Finally, click OK

Older versions

Versions below may not run correctly on the iCSF now that it has had an O/S upgrade. If you are having problems with any of the versions below, please try a newer version (see above) before contacting the Research Infrastructure team. In any request for help, please indicate which versions you have tried.
  • Rstudio 2023.06.2-any-r (This version, and older versions below, may not run correctly on the incline2000 nodes!)
    module load apps/gcc/R/x.y.z                      # See the R page for available versions of R
    module load apps/binapps/rstudio/2023.06.2-any-r  # Mac users: you may need to use an older
                                                      # version if this doesn't work when using x2go.
                                                      # See below.
    
  • Rstudio 2022.07.2-any-r
    module load apps/gcc/R/x.y.z
    module load apps/binapps/rstudio/2022.07.2-any-r  # Mac users: you may need to use an older
                                                      # version if this doesn't work when using x2go.
                                                      # See below.
  • Rstudio 1.3.1073-any-r
    module load apps/gcc/R/x.y.z
    module load apps/binapps/rstudio/1.3.1073-any-r  # Mac users: you may need to use an older
                                                     # version if this doesn't work when using x2go.
                                                     # See below.
    
  • Rstudio 1.2.5019
    module load apps/gcc/R/x.y.z
    module load apps/binapps/rstudio/1.2.5019-any-r
  • Rstudio 1.2.1335
    module load apps/gcc/R/x.y.z
    module load apps/binapps/rstudio/1.2.1335-any-r
    
  • Rstudio 1.1.423
    module load apps/gcc/R/x.y.z
    module load apps/binapps/rstudio/1.1.423-any-r
    
  • Rstudio 1.0.153
    module load apps/gcc/R/x.y.z
    module load apps/binapps/rstudio/1.0.153-any-r
  • Rstudio 0.98.1103
    module load apps/gcc/R/x.y.z
    module load apps/binapps/rstudio/0.98.1103-any-r
  • Rstudio 0.98.1103 using R 3.4.2 specifically:
    module load apps/gcc/R/3.4.2
    module load apps/binapps/rstudio/0.98.1103-any-r
    
  • Rstudio 0.98.983
    module load apps/gcc/R/x.y.z
    module load apps/binapps/rstudio/0.98.983-any-r
    
  • Rstudio 0.98.983 using R 3.1.0 specifically:
    module load apps/binapps/rstudio/0.98.983
    
  • Rstudio 0.97.551 (not recommended) using R 3.0.2 specifically:
    ### If logging in from nyx3/nyx4 virtual desktop:
    module load apps/gcc/rstudio/0.97.551
    
    ### If logging in via ssh (PuTTY/MobaXterm/ssh)
    module load apps/binapps/rstudio/0.97.551
    

Running the application

Once you have loaded the modulefile use the following command to start RStudio:

rstudio

Once the RStudio user interface starts try running the following command in the console section if new to RSudio:

demo(graphics)

Known issues

  • If you are having font display problems in a plot please try adding options(bitmapType='cairo') to the start of your plotting code (see the R – Hints and Tips section for a sample R script.)
  • If you see an error segmentation fault when you run rstudio then you have the wrong modulefile loaded for how you are accessing the iCSF.
  • If you see an error “The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I’m aborting now.”  when you run rstudio 2023.06.2 then you need to run rstudio –no-sandbox.

Further info

RStudio online documentation.

If you need to add packages, please see the iCSF R documenation for further details.

Updates

None.

Last modified on October 7, 2024 at 2:38 pm by George Leaver