Defining R Component Paths

In R, /usr/lib64/R/library is the location of installed libraries and packages. However, if R packages and libraries are installed manually by using the command install.packages() or R CMD build source.tar.gz, the path for these newly installed components are not known to Condor unless specified.

The following are common R utilities and commands used to find and specify absolute and relative paths for unique components:

• To identify the default directory from which you read input and to which you write output, use the command getwd(). For example:

> getwd()[1] "/nfs/home/S/sspade"

You also can write to a specific directory using the command sink(<path and file name>).

• To set the default or working directory from which you read input and to which you write output, use the command setwd(). Insert the full path between the parentheses. For example:

> setwd("/nfs/home/S/sspade")
• When installing update packages or libraries from sources other than HMDC's Comprehensive R Archive Network (CRAN) repository, you must specify an absolute path for new components if they do not reside in the default working directory.

For example, to load a library installed in your home directory type the following:

> library(experiment, lib.loc="/nfs/home/S/sspade/.R/library-x886_64")
• To save results to your home directory, use the command save.image(<path and file name>). For example:

> save.image("/nfs/home/S/sspade/condor-temp/condorprac.Rdata")