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?
Procedure to start RStudio¶
Below is a step-by-step procedure to start RStudio on Pelle.
Prefer a video?
1. Start a Pelle remote desktop environment¶
This can be either:
- Login to the Pelle remote desktop environment using the website
- Login to the Pelle remote desktop environment using a local ThinLinc client
2. Start an interactive session¶
Within the Pelle remote desktop environment, start a terminal. Within that terminal, start an interactive session with 2 cores:
Where:
[naiss_project_id]is an UPPMAX project code[duration]is the duration of the interactive session
Resulting in, For example:
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?
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:
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 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 started up:

RStudio when ready:

RStudio in action:

The RStudio debugger, at the error message level:

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

The RStudio debugger, at the program level:
