Thursday 20 September 2012

Install the latest version of R in Ubuntu

The R version in the Ubuntu repositories is not the latest, so here's how to install R into Ubuntu 12.04:

Add the SSL key and import into apt:
 gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9  
 gpg -a --export E084DAB9 | sudo apt-key add -  

Add the repository to your sources list, by doing:
 sudo nano /etc/apt/sources.list  

Then add this line to the bottom of the sources file:
 deb http://cran.ma.imperial.ac.uk/bin/linux/ubuntu precise/  

Then, to install the latest version of R, do:
 sudo apt-get update  
 sudo apt-get install r-base  

Hit yes at the prompts, and voila, the latest version of R is installed!

No comments:

Post a Comment

Please leave a comment if you find this blog helpful or interesting! I'd love to hear from you!