The installed version is 3.3.0.
I would like to install version 2.X but I don't know how.
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.
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.
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
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With