How to install R version 3

21,891

This is an old post and I wrote it when it was impossible to install R with simple (it was installing old 2.15 version):

sudo apt-get install r-base-core

Right now you do not need to do all written below and can simply use the abovementioned command. At the time of updating it will give you 3.1 version.

Here is previous post

Uninstall old R

sudo apt-get remove r-base-core

Open sources.list

sudo nano /etc/apt/sources.list    

and add deb to it

deb http://cran.rstudio.com/bin/linux/ubuntu precise/

precise is your ubuntu name (may be different)

Add key to sign CRAN packages

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

Add specific PPA to the system

sudo add-apt-repository ppa:marutter/rdev
sudo apt-get update
sudo apt-get upgrade

installing

sudo apt-get install r-base

From R to check version

version

should give you

version.string R version 3.0.0 (2013-04-03)

Hope people will find this helpful

Share:
21,891
Salvador Dali
Author by

Salvador Dali

I am a Software Engineer in the Google Search Growth team. I use Tensorflow and TFX to analyze search data and Go to write data pipelines. This is my personal profile which has absolutely nothing to do with my employer.

Updated on May 07, 2020

Comments

  • Salvador Dali
    Salvador Dali almost 4 years

    After having some problems to install new version of R from command line on Ubuntu (straightforward way just updated it to version 2.15.x)

    I want to share the way to do this.

  • Waldir Leoncio
    Waldir Leoncio about 8 years
    Check cran.rstudio.com/bin/linux/ubuntu for updated instructions.
  • Hangchen Yu
    Hangchen Yu over 7 years
    This works. But don't forget to replace "precise" with your Ubuntu name cran.rstudio.com .