Data Scientist - Benjamin Tovar

Upgrade and update R 2.X to R 3.X in Debian Wheezy 7.X

14

Mar

 

Upgrade and update R 2.X to R 3.X in Debian Wheezy 7.X

Introduction

Following the instructions from CRAN, you need to add the R backports in your source list.

FIRST PART: ADD R BACKPORTS:

First, open a Terminal and open the sources.list file:

$ gksudo gedit /etc/apt/sources.list

Then, add these lines at the bottom of the file (Note, I use the Revolution Analytics Dallas, TX server, but this can be easily changed taking a look here for the mirrors):


## R BACKPORTS FOR WHEEZY
deb http://cran.revolutionanalytics.com/bin/linux/debian wheezy-cran3/
#deb-src http://cran.revolutionanalytics.com/bin/linux/debian wheezy-cran3/

SECOND PART: RENAME THE R PACKAGES FOLDER:

There’s a folder where R uses to store the packages we download, just rename it to the current version of R. For example, mine was “2.15” and then I just renamed it to “3.0” and was inside this path:

Before:
/home/xxxx/R/x86_64-pc-linux-gnu-library/2.15
After:
/home/xxxx/R/x86_64-pc-linux-gnu-library/3.1

THIRD PART: SECURE APT:

The Debian backports archives on CRAN are signed with the key ID 381BA480, to add them, in a Terminal prompt type:


gpg --keyserver pgp.mit.edu --recv-key 381BA480
gpg -a --export 381BA480 > jranke_cran.asc
sudo apt-key add jranke_cran.asc

FOURTH PART: UPDATE AND UPGRADE R:

Save the file and you can either enter to Synaptic, update the packages list and then just upgrade the packages or in a terminal type:


sudo apt-get update
sudo apt-get upgrade

And that’s all.
Benjamin

twittergoogle_plusredditlinkedin

Tags: , ,


Leave a comment
 

Your email address will not be published. Required fields are marked. *