Index of /Research/r

  1. Sample R 3.1.1 file (commands only)

  2. HTML version (both input & output)

  3. PDF version (both input & output)

  4. Sample data file and description

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:

library(scatterplot3d)

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:

Then issue two commands at the UNIX prompt:
module load math/R-latest 
R CMD BATCH --quiet --no-restore --no-save test0.R test0_output.txt
All 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.


Legacy documentation I wrote years ago on

running pre-installed software packages in batch

and

interactive use of Odyssey (i.e., not submitting jobs)

surprisingly still exists on the RC site. This was based on LSF, which has now been superseded by SLURM.