Index of /cran/bin/linux/debian

[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -  
[   ]README06-Jun-2010 15:36 7.3K 
[TXT]README.html06-Jun-2010 15:36 9.0K 
[DIR]etch-cran/07-May-2010 17:38 -  
[DIR]lenny-cran/03-Jun-2010 16:00 -  

DEBIAN PACKAGES OF R SOFTWARE

R packages for the base system have been part of the Debian distribution since 1997. R, as well as many add-on packages (from CRAN and others repositories) are available via the regular Debian distribution mechanisms. Hence, running

   apt-cache search ^r-.*

should get you started with a list of available packages.

DEBIAN STABLE

After a release of Debian "stable", no new packages get added by Debian to keep the release as 'stable' as possible. This implies that the R release contained in the official Debian release will become outdated as time passes. As a courtesy to the R users on the Debian "stable" platforms, the "stable" directory on CRAN contains so-called 'backports' of the current R binaries for the "stable" distribution of Debian.

For a backport of the latest R release to lenny, simply add something like

   deb http://<favorite-cran-mirror>/bin/linux/debian lenny-cran/

to the file /etc/apt/sources.list on your computer and install as usual.

Note that you need to substitute <favorite-cran-mirror> by one of the mirror URLs listed in

   http://cran.r-project.org/mirrors.html

Special note for R 2.11.0: After installing R 2.11.0 from CRAN, you will have to update or reinstall all R packages that have been installed with an R version lower than R 2.10.X, as they will not work with the new help system. This will be the case for any r-cran-* debian packages from the lenny distribution that you may still be using.

There are binaries for the i386 and amd64 architectures. You can use the source packages from

   deb-src http://<favorite-cran-mirror>/bin/linux/debian lenny-cran/

to compile binaries for other platforms.

With an appropriate enty in /etc/apt/sources.list, the newest R release can be installed using a command sequence like

   apt-get update
   apt-get install r-base r-base-dev

While updating your package lists you might get a warning about a missing key, telling you that the integrity of packages can not be verified. You can ignore this if you trust the CRAN servers and continue with the installation. Otherwise, please refer to the section on secure apt below.

You only need r-base-dev if you want to compile R packages yourself or other software depending on R (see section below on administration and maintenance). Be aware that you may also have to install build dependencies (typically -dev packages containing headers). The list r-sig-debian is a good place to ask if you run into problems.

If you have been apt-pinning R from unstable as described here before, it is now advised to use the backported packages and to remove or comment out the entries for unstable (sid) in /etc/apt/preferences and /etc/apt/sources.list.

DEBIAN OLDSTABLE

For a backport of R 2.11.0 to etch, simply add something like

   deb http://<favorite-cran-mirror>/bin/linux/debian etch-cran/

to the file /etc/apt/sources.list on your computer and install as usual. There are binaries for the i386 and amd64 architectures. You can use the source packages from

   deb-src http://<favorite-cran-mirror>/bin/linux/debian etch-cran/

to compile binaries for other platforms.

SUPPORTED PACKAGES

A number of R packages are available from the Debian repositories with names starting with r-cran-. Note, however, that only the packages part of the r-recommended set are kept up-to-date on CRAN. Currently, these are:

   r-cran-boot
   r-cran-cluster
   r-cran-class
   r-cran-codetools
   r-cran-foreign
   r-cran-kernsmooth
   r-cran-lattice
   r-cran-mass
   r-cran-matrix
   r-cran-mgcv
   r-cran-nlme
   r-cran-nnet
   r-cran-rmatrix
   r-cran-rpart
   r-cran-spatial
   r-cran-survival

Because they rely on the installed version of R, I also provide versions of the following packages as up-to-date as the Debian release allows:

   littler
   r-cran-rodbc
   python-rpy

SECURE APT

The Debian backports archives on CRAN are signed with the key of "Johannes Ranke (CRAN Debian archive) <jranke@uni-bremen.de>" with key ID 381BA480. You can fetch this with

   gpg --keyserver subkeys.pgp.net --recv-key 381BA480

or alternatively, using another key server,

   gpg --keyserver pgp.mit.edu --recv-key 381BA480

If this doesn't work, it might be due to a firewall blocking port 11371. Alternatively, you can search for 0x381BA480 at http://keyserver.noreply.org/ and copy the key block into a plain text file, named, for instance, jranke_cran.asc.

If receiving the key with gpg did work, you need to export it to a text file

   gpg -a --export 381BA480 > jranke_cran.asc

In both cases you need to make the key known to the apt system by running

   apt-key add jranke_cran.asc

as root.

ADMINISTRATION AND MAINTENANCE OF R PACKAGES

The R packages part of the r-base and r-recommended packages are installed into the directory /usr/lib/R/library. These can be updated using usual package maintenance tools like apt-get or aptitude.

The other R packages precompiled as Debian packages r-cran-* are installed into /usr/lib/R/site-library.

The command

   apt-cache rdepends r-base-core

shows all packages that depend on r-base-core; this comprises a large number of contributed packages from CRAN and other repositories.

If you want to install R packages not provided as Debian packages, or if you want to use newer versions, you need to build them from source which requires the development package r-base-dev that can be installed by

   apt-get install r-base-dev

This makes sure that you have the basic requirements for compiling R packages. R packages may then be installed by the local user/admin from the CRAN source packages, typically from inside R using the

   > install.packages()

function or using R CMD INSTALL from a shell. If you have proper write permissions in /usr/local/lib/R/site-library/, and you have not set R_LIBS_USER manually, they will be installed there. Otherwise, a warning will be issued and they will be installed in the directory specified by R_LIBS_USER, which is defined in /etc/R/Renviron, but which can be overriden in ~/.Renviron. A routine update of such locally compiled packages can be done within

   > update.packages()

PATHWAYS TO R PACKAGES

In order to find packages, R looks at the variables R_LIBS_USER and R_LIBS_SITE. On Debian and Ubuntu, R_LIBS_USER is set in /etc/R/Renviron to

   R_LIBS_USER=${R_LIBS_USER-'~/R/$platform-library/2.11'}

where $platform is something like 'x86_64-pc-linux-gnu'. R_LIBS_SITE is set in the same place to

   R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library'}

REPORTING PROBLEMS

The best place to report problems with these packages or ask R questions specific to Debian is the R-SIG-Debian mailing list. See

   https://stat.ethz.ch/mailman/listinfo/r-sig-debian

for more information.

BACKPORTING FOR DEBIAN

Anyone interested in building Debian packages (e.g. for an unsupported release, another architecture or an old R version) can have a look at the build scripts used by the current maintainer. These are available anonymously from the Subversion repository

   http://kriemhild.uft.uni-bremen.de/viewvc/r-backports

The scripts contain many small changes needed to compile the original Debian packages on the supported release.

ACKNOWLEDGEMENT

The Debian R packages are maintained by Dirk Eddelbuettel. The packages present on CRAN for stable and oldstable (etch) are provided by Johannes Ranke.