Wednesday, February 12, 2014

How to upgrade R version on Ubuntu

There are lots of directives on the web how to upgrade R version or installing the latest version of R. Here I am going to tell the clearest and success way that I have done.

Open your terminal (Ctrl+Alt+T) 
1. Uninstall current R version on your system
sudo apt-get remove r-base-core
2. Add cran.rstudio deb to sources.list
sudo nano /etc/apt/sources.list    
Paste the below code in to your sources.list
deb http://cran.rstudio.com/bin/linux/ubuntu precise/
My version is "precise".  That's why the line ends with "precise". You can learn your Ubuntu version:
lsb_release -a
Codename is your version....

3. Add key to sign CRAN packages
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
4. Add PPA (for CRAN) to your system
sudo add-apt-repository ppa:marutter/rdev
sudo apt-get update
sudo apt-get upgrade
5. Install R again 
sudo apt-get install r-base
If you want to check the version of your R. Open terminal, enter R and type:
version
That's all.....

No comments: