RStudio on Bianca¶
Introduction¶
RStudio is an IDE specialized for the R programming language.
What is an IDE?
See the page on IDEs.
In this session, we show how to use RStudio on Bianca, using Bianca's remote desktop environment.
Forgot how to login to a remote desktop environment?
See the 'Logging in to Bianca' page.
Spoiler: go to https://bianca.uppmax.uu.se/
As RStudio is a resource-heavy program, it must be run on an interactive node.
Forgot how to start an interactive node?
Procedure to start RStudio¶
Below is a step-by-step procedure to start RStudio on Bianca.
Prefer a video?
This procedure is also demonstrated in this YouTube video.
1. Get within SUNET¶
Forgot how to get within SUNET?
See the 'get inside the university networks' page here
2. Start the Bianca remote desktop environment¶
Forgot how to start Bianca's remote desktop environment?
3. Start an interactive session¶
Within the Bianca remote desktop environment, start a terminal. Within that terminal, start an interactive node with 2 cores:
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.
Where [project_number]
is your
UPPMAX project, for example:
What is my UPPMAX project number?
Easy answers that is probably true:
The one you used to login, which is part of your prompt.
For example, in the prompt below, the project is sens2016001
.
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.
4. Load the modules needed¶
In the terminal of the interactive session, do:
In the terminal of the interactive session, do:
What happens if I do not load R
or R_packages
?
Then you will have the sytem-wide R version 3.6.0 without any packages installed.
For UPPMAX staff
There have been issues using RStudio/2023.06.2-561
together with R/4.3.1
5. Start RStudio¶
With the modules loaded, start RStudio from the terminal (on the interactive node):
RStudio can be slow to startup, as R has thousands (!) of packages. Additionally, at startup and if enabled, your saved RStudio workspace (with potentially a lot of data!) is read.
How does RStudio look on Bianca?
RStudio when starting up:
RStudio when started up:
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:
Troubleshooting¶
RStudio freezes when I start it, where yesterday it still worked¶
Hypothesis: Your home folder is full¶
Your home folder is full. That explains why it still worked yesterday: at that day, your home folder was not full yet.
RStudio uses your home folder to store the things it needs, so when it is full, it cannot do its things.
To confirm, from a terminal do:
This will show how much space the folders in your home folder take:
In this example, there is a folder called wharf_backup
that is
4.5 gigabyte. Moving it to a project folder solved the problem:
For example: