![]() |
|||||
|
Running R on Ada
10-Apr-2007 Introduction R is a language and environment for statistical computing and graphics. It is similar to the S language that was developed at Bell Laboratories. This document will describe how to run a very basic R job on Ada. Running R with PBS The steps for running R with PBS on Ada are described below: 1. Prepare the Data Directory Create a directory to store your input and output data files. In this example, the input and output files and the PBS script will all be stored in the same directory. This is not required but is presented this way here to simplify the instructions. Start by creating a working directory called R, for example:
Create an R data file in this directory and call it Rdata.dat. Then create an R script input file called Rinput with contents such as the following:
2. Initialize your Environment to run R In order to run R, you need to initialize your environment using the module command as follows:
This command will set the appropriate environment variables that you need to run R. 3. Prepare and Run the PBS Job Once the data files are in place, create a PBS batch job script called R.pbs in the same directory with the following contents:
Now run the PBS job from this working directory as follows:
More Information For information about command line arguments for R, use the man R command. To view the user's guide, please see the R website.
|
|||||
|