Setup
While the principles in this workshop are generally applicable to both HPC and non-HPC environments, we recommend that you use an existing ColdFront project and compute allocation for this workshop on M3 and follow along using the M3 tab throughout. If you do not have access to HPC resources, you can follow along on the Local tab throughout, although the later sections regarding the Slurm job scheduler will not apply.
Loading R and RStudio
If you are not on campus while going through this content, you will need to connect to the VPN or switch to running locally.
You can launch an RStudio session via the HPC Portal.
Navigate to
Interactive Apps→RStudio ServerUse the following settings:
Slurm Account Choose an appropriate one R Version 4.5.1 Custom Environment Settings Leave blank Partition dev Time (Hours) 2 Timeout (minutes) 60 Cores per node 1 Memory 4
- Launch the job and wait for it to start
To access R from an SSH session, first you’ll need to be on a compute node. Add your Slurm account to the following command and run it from a login node:
srun -A <your-slurm-account> -p dev -c 1 -t 180 --mem=4G --pty $SHELLOnce the interactive job starts, you can launch an R session with:
module load R/4.5.1
RIf you do not already have R and RStudio installed, you can install them by following the instructions here.
Once installed, just simply launch RStudio and you are ready to go.