Sunday, March 31, 2013

Installing R on Ubuntu 12.04



I want to backup the steps i took to install on my Ubuntu. Wondering what version you are running?

thedatafugee:~$lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.02 LTS
Release: 12.04
Codename: precise

R is a wonderful statistical data mining package highly used by the spam fighting teams while i worked at Google Inc - so you definitely have to try and pick up skills on this tool/language. I've personally been improving in using the tool/language and i now can't do any analysis on data without running with R.


Here's how I installed R on Ubuntu 12.04.


Firstly get the repository SSL key and import it in to apt.


thedatafugee:~$gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9

thedatafugee:~$gpg -a --export E084DAB9 | sudo apt-key add -

Next edit your sources list...


thedatafugee:~$gksudo gedit /etc/apt/sources.list

I always add the repository to the bottom. Don't touch any other sources.


go to main repository and choose a mirror, add as shown below.




NB: Replace the "<my.favorite.cran.mirror>" with  www.stats.bris.ac.uk/R/ or any other depending  on your location.


Then install R.


thedatafugee:~$sudo apt-get update
thedatafugee:~$sudo apt-get install r-base

Now you can get an R prompt with typing R on your terminal.

thedatafugee:~$R

No comments:

Post a Comment

Add any comments if it helped :)