[R-sig-Debian] A guide to R packages for Ubuntu

Michael Rutter mar36 at psu.edu
Fri Apr 27 20:11:30 CEST 2012


As per a request, here is a brief guide to what is available to R users 
as packages in Ubuntu.

Each release of Ubuntu includes the latest version of R and the 
recommended packages.  In addition, there are approximately 80 
additional r-cran packages available in the default repositories.  The 
limitation to these packages is that they are not updated and reflect 
the current version of the program or package when that version of 
Ubuntu was released.

If you want to have current versions of R and the recommended packages, 
there are two repositories to choose from:

CRAN: http://cran.r-project.org/bin/linux/ubuntu/
Launchpad PPA: https://launchpad.net/~marutter/+archive/rrutter

Both sites have the same packages (the PPA packages are mirrored on 
CRAN), but there may be a reason to use one over the other.

CRAN Advantages:
- A local mirror may be faster in terms of internet speed.
- Older versions of the packages are available, so if an update to R or 
a core package breaks your code, you can reinstall an older version via 
synaptic or apt.

PPA Advantages:
- Quickest way to get the updates (only by about 24 hours however)
- Easy to install (sudo add-apt-repository ppa:marutter/rrutter)

If you have been using CRAN, then there is no reason to change to the 
PPA, as the same packages is provided at both locations.  I will 
continue to maintain both sites, so no need to worry about one or the 
other going away.

If you want additional packages (over 1,100), you can check out my 
cran2deb4ubuntu PPA:

https://launchpad.net/~marutter/+archive/c2d4u

In theory, this PPA has all the packages listed in the CRAN Task Views 
and any dependencies.  In practice, is has about 98% of them, as some 
packages have issues.  These packages can be installed via synaptic or 
apt (sudo apt-get install r-cran-ggplot2, for example).  The main 
advantage of this approach is that tricky Ubuntu package requirements 
will automatically be installed when installing the package.  They will 
also be automatically updated during normal Ubuntu updates, which is 
another advantage.  These packages are NOT installed when a 
install.packages("foo") command is used from within R.

One of my plans this summer/sabbatical is create documentation for the 
cran2deb4ubuntu project and give more information about what is and what 
is not available.

If you have any further questions, please let me know.
Michael

-- 
Dr. Michael A. Rutter
School of Science
Penn State Erie, The Behrend College
Station Road
Erie, PA 16563
http://math.bd.psu.edu/faculty/rutter



More information about the R-SIG-Debian mailing list