RStudio
RStudio is an integrated development environment (IDE) for R, providing console access, code editing with syntax highlighting, plotting tools, and debugging features.
Launching RStudio
Connect to interactive.hpc.caltech.edu
Navigate to Interactive Apps → RStudio Server
Specify resource requirements (hours, cores, memory, GPUs)
Click Launch
Click Connect to RStudio Server once a node is available
Note
Requires campus network or Caltech VPN.
Package Installation
R and RStudio are installed in a read-only central location. Configure a writable directory for packages:
1. Create Library Directory
mkdir -p /resnick/groups/<group-name>/<username>/R-Libraries
Tip
Use group directories (20 TB) rather than home directories (50 GB limit).
2. Configure R Environment
Edit ~/.Renviron:
vi ~/.Renviron
Add:
R_LIBS_USER=/resnick/groups/<group-name>/<username>/R-Libraries
3. Restart RStudio
Log out and restart your RStudio session through Open OnDemand.
4. Install Packages
In R console:
install.packages("tidyverse", dependencies = TRUE)
Example: Installing tidyverse
# Check library path
.libPaths()
# Install tidyverse and dependencies
install.packages("tidyverse", dependencies = TRUE)
# Load and verify
library(tidyverse)
Troubleshooting
Package Installation Fails
Check disk quota:
hpcquotaEnsure
R_LIBS_USERis set correctlyTry installing without dependencies first
RStudio Won’t Connect
Clear browser cache
Try a different browser
Check if you have pending jobs using resources