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 directorywget http://cran.rstudio.com/src/base/R-3/R-3.2.2.tar.gztar xvf R-3.2.2.tar.gzcd R-3.2.2mkdir ~/Programme # create a folder called Programme for R./configure --prefix=$HOME/Programmemake && make installThen 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:$PATHfiPATH=$HOME/Programme/bin/:$PATHbut still could not get it worked.the R in my directory can be executed:[myusername@host ~]$ ~/Programme/bin/RR version 3.2.2 (2015-08-14) -- Fire SafetyCopyright (C) 2015 The R Foundation for Statistical ComputingPlatform: x86_64-pc-linux-gnu (64-bit)
How to set PATH for R installed in my directory
path
R is in default $PATH, put you own first: PATH=$HOME/Programme/bin/:$PATH (assumming $HOME is /user/institute/username ) do not use PATH=$PATH:/user/institute/username/Programme/bin/:$PATH this will still put /usr/bin before /user/institute/username/Programme/bin.you setif [ -d HOME/bin ];then       PATH=$HOME/bin:$PATH  fiThis might be usefull for any programs you have in $HOME/bin, but not for R.