Skip to content

RStudio on Pelle

Introduction

RStudio is an IDE specialised for the R programming language

In this session, we show how to use RStudio on Pelle, using Pelle's remote desktop environment.

Forgot how to login to a remote desktop environment?

See the 'Logging in to Pelle' page.

Spoiler: go to https://pelle.uppmax.uu.se/

As RStudio is a resource-heavy program, it must be run on an interactive session.

Forgot how to start an interactive session?

See the 'Starting an interactive session' page.

Procedure to start RStudio

Below is a step-by-step procedure to start RStudio on Pelle.

Prefer a video?

Watch the YouTube Video 'RStudio on Pelle'

1. Start a Pelle remote desktop environment

This can be either:

2. Start an interactive session

Within the Pelle remote desktop environment, start a terminal. Within that terminal, start an interactive session with 2 cores:

interactive -A [naiss_project_id] -n 2 -t [duration]

Where:

  • [naiss_project_id] is an UPPMAX project code
  • [duration] is the duration of the interactive session

Resulting in, For example:

interactive -A naiss2024-22-310 -n 2 -t 8:00:00

Why two cores?

RStudio is a resource-heavy program. Due to this, we recommend using at least two cores for a more pleasant user experience.

What is an interactive session?

See start an interactive session

Do not start RStudio from the menus

You can start a version of RStudio from the menus. However, this will not have access to loaded modules.

Instead, load RStudio from the module system instead.

3. Load the modules needed

In the terminal of the interactive session, do:

module load R/4.5.1-gfbf-2024a RStudio/2025.09.0-387
What happens if I do not load R?

Then you will have the sytem-wide R version without any packages installed.

4. Start RStudio

With the modules loaded, start RStudio from the terminal (on the interactive session):

rstudio &

RStudio can be slow to startup, if you also load the R-bundles, as thousands (!) of packages need to be registered by RStudio. Additionally, at startup and if enabled, your saved RStudio workspace (with potentially a lot of data!) is read.

How does RStudio look? (Example from Bianca)

RStudio when starting up:

RStudio when starting up

RStudio when started up:

RStudio when started up

RStudio when ready:

RStudio when started up

RStudio in action:

RStudio in action

The RStudio debugger, at the error message level:

The RStudio debugger, at the error message level

The RStudio debugger, at the function-that-caused-the-error level:

The RStudio debugger, at the function-that-caused-the-error level

The RStudio debugger, at the program level:

The RStudio debugger, at the program level