How can I download a specific version of R on Linux?

R 3.0 is my default version. I have R 2.14 installed and you want to use it because of package dependencies. Please note that packages cannot be created for version 3.0. How to get Ubuntu to download an earlier version?

+5
source share
1 answer

Accordingly, you set PATH. There are tools / libraries that do this for you (usually in university environments with multiple versions of things in /usr/local/ or /opt .

Here is a simple ad-hoc version:

 edd@max :~$ which R # my default R /usr/bin/R edd@max :~$ R --version | head -1 R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet" edd@max :~$ cat bin/R-devel.sh # a wrapper I use #!/bin/bash export PATH="/usr/local/lib/R-devel/bin:$PATH" R " $@ " edd@max :~$ # gives me another R edd@max :~$ R-devel.sh --version | head -1 R Under development (unstable) (2014-11-11 r66970) -- "Unsuffered Consequences" edd@max :~$ edd@max :~$ ( PATH="/usr/local/lib/R-devel/bin:$PATH" R --version | head -1 ) R Under development (unstable) (2014-11-11 r66970) -- "Unsuffered Consequences" edd@max :~$ 

A change in a file can be done using a script or in different ways. The key is that by prefacing the PATH with the one you need, you will get the first version.

+7
source

Source: https://habr.com/ru/post/1206747/


All Articles