I have installed R couple years ago and yesterday I compiled a recent version from source.
I now have version 3.4.4 installed, and it's launched with
R. Accordingly, I have these command returning like below :
~$ R --version R version 3.4.4 (2018-03-15) -- "Someone to Lean On" ~$ which R /usr/bin/R
My newest version is installed in a custom directory like so
~/R-3.6.3/bin$ ./R --version R version 3.6.3 (2020-02-29) -- "Holding the Windsock" ~/R-3.6.3/bin$ which R /usr/bin/R
How can I modify the R version that will be used when I launch
I've tried a modification of the PATH in .bashrc
export PATH="$HOME/R-3.6.3/bin:$PATH" export PATH=$PATH:$HOME # result in terminal: ~$ R --version R version 3.6.3 (2020-02-29) -- "Holding the Windsock" ~$ which R /home/maxime/R-3.6.3/bin/R # but I don't understand this issue here with sudo ~$ sudo which R /usr/bin/R ~$ sudo R --version R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
It work is some way because when I launch R from terminal, I get the 3.6.3 version. But when I launch R from the desktop, I only get the old version.
Should I modify the R.desktop ? I don't understand because it also send the
R command...I suppose the .desktop don't get by the .bashrc then...
The ideal solution could be a modification of a line in a file, so I can change this easily and understand which version is used.
Thanks anymay !