How to install an R package in your home directory.

Many R packages are already packaged to be used with Debian (the Linux distribution CAE uses); however, some packages are too new to be included with the operating system. If they are packaged as an R CRAN package they can be installed in a user's home directory.

Many R CRAN packages are already packaged to be used with Debian (the Linux distribution CAE uses); however, some packages are too new to be included with the operating system.  If you need a new R package installed, to be used by a group of users, please submit a request along with the class requesting this package (http://www.cae.wisc.edu/contact) .  Otherwise R packages can be installed in a user's home directory as shown below.

To use locally installed R packages you will need to create a place for them:
mkdir ~/R/; mkdir ~/R/libs/
You will also need to tell R where this place is:
echo 'R_LIBS_USER="~/R/library"' >  $HOME/.Renviron
Once this is done you can install as many packages there as your quota allows.

Given a package named: mypackage.tar.gz
R CMD INSTALL -l ~/R/libs/ mypackage.tar.gz

At this point, your package is installed. Please refer to the package documentation for instructions on usage.




Keywords:R package statistics   Doc ID:28293
Owner:Ken H.Group:Computer-Aided Engineering
Created:2013-01-25 17:48 CDTUpdated:2013-01-25 18:21 CDT
Sites:Computer-Aided Engineering
Feedback:  0   0