Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I don't know where to put this line in the file. Or is there the possibility to achieve it over the shell somehow? I'm using 14.04.

INSTALLATION

To obtain the latest R packages, add an entry like

deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu trusty/ or

deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu precise/ or

deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu lucid/

in your /etc/apt/sources.list file, replacing <my.favorite.cran.mirror> by the actual URL of your favorite CRAN mirror. See http://cran.r-project.org/mirrors.html for the list of CRAN mirrors. To install the complete R system, use

sudo apt-get update
sudo apt-get install r-base

My mirror would be: http://stat.ethz.ch/CRAN/

share|improve this question
    
Do you really need the latest version? Version 3.0.2 is available from the standard repository for Ubuntu Trusty (without adding anything to your sources.list file) just by typing sudo apt-get update && sudo apt-get install r-base –  steeldriver Jul 27 at 11:51
    
If one is doing anything bioconductor-related (which by now is a large portion of the R community), one must use the very latest stable R. –  Gx1sptDTDa Jul 27 at 11:54

1 Answer 1

up vote 3 down vote accepted

Add the following line to your /etc/apt/sources.list file. It doesn't matter where exactly, but end of the file is ok.

deb http://stat.ethz.ch/CRAN/bin/linux/ubuntu trusty/ #enabled-manually

If you insist on doing this in a terminal, do the following:

sudo su 
echo "deb http://stat.ethz.ch/CRAN/bin/linux/ubuntu trusty/ #enabled-manually" >> /etc/apt/sources.list
exit

This will launch a super user session, and append the line to the sources.list file, after which we exit from the super user session.

Then, per the R installation instructions, one must add the public key of Michael Rutter to secure apt. Execute the following in a terminal:

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

Then simply do sudo apt-get update && sudo apt-get install r-base r-base-dev.

Happy R-ing!

share|improve this answer
    
Thanks a lot. I hope I get a grip with it. –  empedokles Jul 27 at 12:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.