Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install older R version on CentOS

Tags:

r

centos

The installed version is 3.3.0.

I would like to install version 2.X but I don't know how.

like image 834
manie Avatar asked Jun 12 '16 01:06

manie


People also ask

How do I install old R packages?

Installing an older package from source If you know the URL to the package version you need to install, you can install it from source via install. packages() directed to that URL. If you don't know the URL, you can look for it in the CRAN Package Archive.

How do I install different versions of R?

You can select different versions of R by selecting it from the drop down list at the top of the browser window. The drop down menu will allow you to select the version of R you want to use. When you switch versions, the system will ask if you want to save your workspace before restarting your session.


3 Answers

Are you building from the tar.gz file? If so, you should be able to download any version you like, here's a folder with the files for 2.x versions:

https://cran.r-project.org/src/base/R-2/

EDIT to add:

You can try installing like so, in your shell terminal. (this should work in, for example, Debian, but please read on for the OP's solution in CentOS).

wget https://cran.r-project.org/src/base/R-2/R-2.15.3.tar.gz
tar zxvf R-2.15.3.tar.gz; cd R-2.15.3/ 
./configure; make; sudo make install

ADDED from OP, who found a CentOS solution:

Thanks to @resscova's answer and some research on the net. Here's how to install R-2.X.tar.gz on Centos :

yum groupinstall "Development Tools"
yum install ncurses-devel zlib-devel texinfo gtk+-devel gtk2-devel qt-devel tcl-devel tk-devel kernel-headers kernel-devel
./configure --with-x=no
make
make install
like image 179
rosscova Avatar answered Oct 17 '22 07:10

rosscova


Thanks to @resscova's answer and some research on the net. Here's one way install R-2.X.tar.gz on Centos:

yum groupinstall "Development Tools"
yum install ncurses-devel zlib-devel texinfo gtk+-devel gtk2-devel qt-devel tcl-devel tk-devel kernel-headers kernel-devel
./configure --with-x=no
make
make install
like image 31
manie Avatar answered Oct 17 '22 08:10

manie


I installed R-3.3.3 with sources - https://cran.r-project.org/src/base/R-3/R-3.3.3.tar.gz on CENTOS 7 after xlsx library stops working with R-3.4.1

These are the steps I took for successful Installation of R 3.3.3

wget https://cran.r-project.org/src/base/R-3/R-3.3.3.tar.gz
tar xvzf R-3.3.3.tar.gz
cd R-3.3.3
yum groupinstall "Development Tools"
yum install ncurses-devel zlib-devel texinfo gtk+-devel gtk2-devel qt-devel tcl-devel tk-devel kernel-headers kernel-devel readline-devel

./configure --with-x=no 
make
sudo make install

Make sure to install readline-devel otherwie you may have to use --with-readline=no while configuring make file.

like image 4
Tushar Avatar answered Oct 17 '22 08:10

Tushar