Pages

Friday, November 15, 2013

Install R Package in User Account on UNIX Cluster

R is a wonderful open-source statistical program with new and exciting packages constantly being released.  Often UNIX cluster administrators don't have the time (or interest) to update or add new packages as they are released.  Here's where this blog post comes in.  By installing R packages in a directory on your UNIX account and loading them from there you can circumvent the need to have cluster administrators install these packages.  Briefly, here is how to do this:


(1) Install the R package either from the UNIX console or R console to a directory within your user account.
From UNIX console:
or

From R console:

In the above example, pkg is the R package you want to install and /R_packages/ is the directory you would like to install them in.


(2) To load the package for use in R, simply put the following command in your script.

No comments:

Post a Comment