Install a new package to your computer
Method 1: Install from source
Download the add-on R package, say mypkg, and type the following command in Unix console to install it to /my/own/R-packages/:
$ R CMD INSTALL mypkg -l /my/own/R-packages/
Method 2: Install from CRAN directly
Type the following command in R console to install it to /my/own/R-packages/ directly from CRAN:
> install.packages("mypkg", lib="/my/own/R-packages/")
Load the library
Type the following command in R console to load the package> library("mypkg", lib.loc="/my/own/R-packages/")