Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install particular version(2.15.2) of r-base on ubuntu

I am newbie to both Ubuntu and R.

I am trying to install R 2.15.2 on ubuntu. Since the latest version of R is 3.0.X, I specified the version in /etc/apt/sources.list

deb http://cran.ma.imperial.ac.uk/bin/linux/ubuntu precise 2.15.2

Then I ran sudo apt-get install r-base.

It installs, but when I check version, it is 2.14.1, not 2.15.2

I tried to specify version in command line, such as:

sudo apt-get install r-base_2.15.2_1precision1

Always seeing:

E: Unable to locate package r-base_2.15.2_1precision1.
E: Couldn't find any package by regex 'r-base_2.15.2_1precision1'

Any suggestion? Thanks.

If I run command:

sudo apt-get install r-base=2.15.2-1precise0

See the following message:

The following packages have unmet dependencies:
r-base : Depends: r-recommended (= 2.15.2-1precise0) but 3.0.1-1precise0precise2 is to be installed
Recommends: r-base-html but it is not going to be installed

like image 691
BlueDolphin Avatar asked May 25 '13 01:05

BlueDolphin


People also ask

How do I install a specific version of an R package?

To install a specific version of a package, we need to install a package called “remotes” and then load it from the library. Afterwards we can use install_version() by specifying the package name and version needed as shown below.


2 Answers

Find the solution.

I need to install like:

sudo apt-get install r-base-core=2.15.3-1precise0precise1
sudo apt-get install r-recommended=2.15.3-1precise0precise1
sudo apt-get install r-doc-html=2.15.3-1precise0precise1
sudo apt-get install r-base=2.15.3-1precise0precise1
like image 140
BlueDolphin Avatar answered Oct 15 '22 10:10

BlueDolphin


Okay so the URL for where the packages are found has changed :^) on the cran.ma site:

Change the debian url to:

deb http://cran.ma.imperial.ac.uk/bin/linux/ubuntu precise/

do an apt-get update and try reinstalling

The complete instructions are on:

http://cran.ma.imperial.ac.uk/bin/linux/ubuntu/

like image 37
Ahmed Masud Avatar answered Oct 15 '22 10:10

Ahmed Masud