R
First, we create example.R
.
library(datasets)
data(iris)
summary(iris)
To run in batch mode, you may use
R CMD BATCH --no-restore --no-save example5.R myoutput.txt
Here is an example of the submission script:
#!/bin/tcsh
#
#SBATCH --qos=cu_htc
#SBATCH --partition=cpugpu
#SBATCH --job-name=example5
#SBATCH --output=example5_log.txt
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --time=00:10:00
#SBATCH --cpus-per-task=1
#SBATCH --mem-per-cpu=2G
module purge
R CMD BATCH --no-save --no-restore example5.R example5_output.txt
Last updated
Was this helpful?