Install R on Ubuntu

Install R on Ubuntu Step by step

The supported releases are

Quetzal (12.10), Precise Pangolin (12.04; LTS), Oneiric Ocelot (11.10),  Natty Nawwhal (11.04), Lucid Lynx (10.04; LTS) and Hardy
Heron (8.04; LTS)

Step 1

Add the software source

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

The complete list of mirrors are available at http://cran.r-project.org/mirrors.html

in your /etc/apt/sources.list file, replacing
<my.favorite.cran.mirror> by the actual URL of your favorite CRAN
mirror.

Example

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

 

Step 2

Add the key to access the software

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

 

Step 3

Install R

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

 

Done :)

http://cran.r-project.org/bin/linux/ubuntu/README

-----

Alternatives to add key

SECURE APT

The Ubuntu archives on CRAN are signed with the key of "Michael Rutter
<marutter@gmail.com>" with key ID E084DAB9.  To add the key to your
system with one command use (thanks to Brett Presnell for the tip):

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

An alternate method can be used by retriving the key with

   gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9

and then feed it to apt-key with

   gpg -a --export E084DAB9 | sudo apt-key add -

-----

No comments:

Post a Comment

Please share your views and comments below.

Thank You.