Click here for zip file containing the above *.R and *.txt files. Place all files on your Desktop.
We will initially perform a calculation and download/install a package
not on lab PCs:
using the R Console. Subsequently all demonstrations will be done in an XEmacs/ESS environment.
To submit as a batch job on the cluster,
log into odyssey.fas.harvard.edu and upload test0.R, revised as follows:
pdf("test0-graphs.pdf") # create graphical output file
dev.off() # close the file
module load math/R-latest R CMD BATCH --quiet --no-restore --no-save test0.R test0_output.txtAll text output goes to "test0_output.txt" and all graphics output goes to "test0-graphs.pdf" (very conveniently!)
Here is the revised version of "test0.R" if you don't wish to perform the above editing steps yourself.
For current documentation on submitting R jobs to Odyssey via SLURM, visit this Research Computing webpage.