R is a nice compannon for stataitical people.From time to time, I have to install various packages to accomplish some tasks. At my desktop (linux server), I have the root access, the installation is pretty simple,
(1)Start R console and fire the installation command,
sudo R
>install.packages(“boa”)
or you can download the package and install it using the command line
sudo R CMD INSTALL boa_1.1.7-2.tar.gz
(2)When working at other server, apparently, I have no root access, have to install packages at my home dir
make a R local dir, download the package and install it
mkdir ~/myRdir
R CMD INSTALL ctv.tar.gz -l $HOME/myRdir
to use it, you have to defined R_LIB environmental variable, I put it at ~/.bashrc
R_LIBS=/home/USER/R
export R_LIBS
then load it is you need as
library(“boa”)
没有评论:
发表评论