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/
Best Answer
Add the following line to your
/etc/apt/sources.list
file. It doesn't matter where exactly, but end of the file is ok.If you insist on doing this in a terminal, do the following:
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:
Then simply do
sudo apt-get update && sudo apt-get install r-base r-base-dev
.Happy R-ing!