UA Research Computing

HPC Examples

R Examples

This repository provides some examples for how to submit R analyses as batch jobs. R jobs may also be run using interactive terminal sessions or using RStudio through Open OnDemand. For information on using R on HPC, see our R documentation.

Basic R Example

A basic “Hello World!” example.

Plotting in a Batch Script

Creating and saving figures as a part of your workflow is possible in a batch script. You can save your figure to a specified directory (the default is your working directory), give it a custom name, control your image quality and dimensions, and choose your output format (e.g., pdf, png, jpg, etc.). An example is included below.

R Array Jobs

Run multiple simulations using the same R script and the same batch submission script while saving the output to unique filenames. For more information on array jobs, see: Array and Parallel Examples