running-r

Execute R scripts on the Yale SOM HPC cluster with Slurm and renv.

5|1|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/yale-som-hpc/claude-code-marketplace --skill running-r
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: running-r
Source: https://github.com/yale-som-hpc/claude-code-marketplace/tree/main/plugins/hpc/skills/running-r
Command: npx skills add https://github.com/yale-som-hpc/claude-code-marketplace --skill running-r

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines running R on the Yale SOM HPC cluster by enforcing explicit module loading, reproducible environments via renv, and safe batch execution of R scripts.

Core Features & Use Cases

  • Explicitly load the R module to guarantee correct versioning and environment.
  • Use renv for reproducible package management, including renv::init, renv::snapshot, and renv::restore workflows.
  • Create and submit Slurm-backed R jobs with controlled BLAS/OpenMP thread settings for predictable performance.
  • Use resumable outputs and safe scripting practices to avoid re-running completed work.

Quick Start

Load the R module, initialize a project renv environment, and submit a Slurm batch job that executes your R script.

Frequently Asked Questions about running-r

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run R scripts in batch mode on an HPC cluster using Slurm?

To run R scripts on an HPC cluster, submit Rscript as a Slurm batch job with explicit module loading and controlled BLAS/OpenMP thread settings for predictable performance across cluster nodes.

Why do I need renv for reproducible environments when running R on HPC?

You need renv on HPC to manage package versions strictly. By initializing renv and committing the renv.lock file, you guarantee that your R batch jobs execute with the exact same package environment every time.

Can I install R packages inside long-running Slurm job arrays?

No, you should not install R packages inside long-running Slurm job arrays. Avoid package installs during execution by restoring dependencies from a committed renv.lock file before submitting the batch job.

What is the best way to control BLAS and OpenMP threads for R on a compute cluster?

The best way to control BLAS and OpenMP threads for R is to configure thread settings within your Slurm batch job script, ensuring predictable performance and preventing resource contention across cluster nodes.

Does running R on Yale SOM HPC require explicit module loading?

Yes, running R on Yale SOM HPC requires explicit module loading to guarantee correct R versioning and environment setup before executing Rscript in batch mode or initializing renv for package management.