Install your own R package

We have meny versions of R installed on Scientific Computing (SciC) Linux Clusters among them, "R-mkl/3.0.2" is the recommended version. It was compiled with Intel compiler with INTEL math kernel and it was shown to be fast and stable.

The users may want to install some packages into R platform. Some of the packages are important generally and you are encouraged to send the package-installation inquiry to Scientific Computing. Or you may think you want to install your own package, without getting it open to public, Then you might need to change the R_lib variable to do that.

You can manipulate the system variable R_LIBS. You can find the value R_LIBS by command ".libPaths();" within R. For example, it was shown to be

[1] "/apps/source/R-3.0.2-mkl/lib64/R/library" 

As you can see, the system folder /apps/source/R-3.0.2-mkl is shown as the first and users do not have writing permission on this folder. So you can not install packages directly at the current stage. You can change the order by adding extra value into R_LIBS

Modify the Rprofile file:

$ nano ~/.Rprofile


If you don't update your .Rprofile then the Master definitions for R would overrule the user's ones.  

Go to KB0027971 in the IS Service Desk

Related articles