Search This Blog

Monday, June 09, 2014

Installing latest version of R-base in ubuntu

apt-cache showpkg r-base

which would give something like


Package: r-base
Versions:
3.0.2-1raring0 (/var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages)
 Description Language:
                 File: /var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages
                  MD5: 5787ca79ed716232c4cc2087ed9b425b

3.0.1-6raring0 (/var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages)
 Description Language:
                 File: /var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_raring_Packages
                  MD5: 5787ca79ed716232c4cc2087ed9b425b

and the I did a

 sudo apt-get install -f r-base=3.0.2-1raring0

and done.



Second Method

Uninstall old R:
sudo apt-get remove r-base-core
Then:
sudo gedit /etc/apt/sources.list
Add the following to the file:
deb http://cran.rstudio.com/bin/linux/ubuntu precise/
and exit gedit.
Then copy/paste these commands into the command line:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo add-apt-repository ppa:marutter/rdev
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install r-base