UPDATE: Install R 2.14.2 or R 2.15 in Debian Squeeze

[This article was first published on Computational Biology Blog in fasta format, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Since not so long, I upgraded  the version of R that is included in the Debian repositories (2.11.1 in Squeeze) and I was very happy with it since 2010. But there was some packages that I could not install and then, I decided to upgrade R despite of having to upgrade every package too (I have more than 1 GB in my home R packages folder).

There’s nothing new or tricky about how to upgrade, the awesome guys of CRAN always brings an answer for our needs.


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 UCLA server, but this can be easily changed taking a look here for the mirrors):

deb http://cran.stat.ucla.edu/bin/linux/debian squeeze-cran/
#deb-src http://cran.stat.ucla.edu/bin/linux/debian squeeze-cran/
The original set of instructions can be seen here.


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.11” and then I just renamed it to “2.14” (or “2.15“, without quotes) and was inside this path:


Remember that some packages also needs to install some files in folders that belongs to the root, so, I would recommend to open R in sudo mode (only if you’re sure about what you’re doing :P) just by executing R this way: “sudo R” and then, in the R console type :

update.packages(checkBuilt=TRUE, ask=FALSE)


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.

To leave a comment for the author, please follow the link and comment on their blog: Computational Biology Blog in fasta format.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)