I would like to install “R” into my directory in the server,
Here is what I have tried following the guidance here: Install R in my own directory
wget http://cran.rstudio.com/src/base/R-3/R-3.2.2.tar.gz tar xvf R-3.2.2.tar.gz cd R-3.2.2 mkdir ~/Programme # create a folder called “Programme” for R ./configure --prefix=$HOME/Programme make && make install
Then when I tried set the PATH for R:
vi .bash_profile #create a .bash_profile #set PATH so it includes user's private bin if it exists if [ -d "HOME/bin" ];then PATH="$HOME/bin:$PATH" fi PATH="$PATH:$HOME/Programme/bin/"
but when I use
which R still I am using the R installed for the whole server, instead of the R in my directory.
the problem is if I could not use my own R, then I could not install other R packages.
Could anyone solve this problem? Thanks very much.
I tried set the .bash_profile into this way:
#set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ];then PATH="$HOME/bin:$PATH" fi PATH="$HOME/Programme/bin/:$PATH"
but still could not get it worked. the R in my directory can be executed:
[myusername@host ~]$ ~/Programme/bin/R R version 3.2.2 (2015-08-14) -- "Fire Safety" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit)