suerte
suerte

Reputation: 73

Installing older version of R

I'm working with R now for some month and I'm still a newbie.

I acutall working for a project to build up R RHadoop and Hadoop. The sandbox + R + RStudio is already running and working.

I wanted to install R + RStudio also on the bigger cluster with several nodes for testing in cluster mode. But when I installed R, is saw, that a new version comes out, 3.2.2. On my sandbox, I'm still working with 3.2.1. Version 3.2.2 seems to have some problem with my code, so I want to use 3.2.1, but I'm not able to install older version of R.

How can I install R-3.2.1-2.el6.x86_64 on the cluster as well?

I'm working on centos 6.

Regards,

suerte

Upvotes: 5

Views: 9048

Answers (1)

Black Butterfly
Black Butterfly

Reputation: 359

I don't know if you found a solution at your problem, but here is how I install old R versions :

0) You should be sure to know which linux version you use

lsb_release -a

You should get something like (this is my result in example):

Distributor ID: Ubuntu
Description: Ubuntu 14.04
Release: 14.04
Codename: trusty

So now I know that my linux is a trusty.

1) After that you need to add a cran repository on your /etc/apt/sources.list

You can find cran address here : https://cran.r-project.org/mirrors.html

That give you access to older package. Choose one for your Linux !!

example :

deb https://cloud.r-project.org/bin/linux/ubuntu trusty/

2) You need to add the registry key to don't have certificate problem. I use this command but fell free to find another one on their website :

gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E084DAB9
gpg -a --export E084DAB9 | apt-key add -

3) Here is the tricky part :

1 --> do an apt-get update to have the new repository

2 --> choose your version in the cran and specify it. That should look like something like that :

apt-get -y install r-base-core=3.1.0-1trusty0 #For R
apt-get -y --force-yes install r-doc-html=3.1.0-1trusty0 #For doc
apt-get -y install r-base-dev=3.1.0-1trusty0 # for dev 
etc ...

Just be careful, I had some problems when I tried to install r-base=.... and r-recommended= .... All the time, that had install the latest version.

For the cluster I don't know yet but I think a script should work.

Hope that helped.

Regards

Upvotes: 3

Related Questions