I run Debian, and I do a mix of two paths: install using apt-get and
install using install.packages() under R. Both work and it's safe to
use both together. However, as has been pointed out, you tend to get
dumped with multiple copies of some packages since the two channels
lead to two different directories (/usr/local/lib/R/site-library for
install.packages() and /usr/lib/R/site-library for Debian). I haven't
yet figured out whether R will automatically use the more-recent
version if there are two versions of a library that are installed.
The Debian path is superior since it involves automatic handling of
dependencies. But I believe that's changed significantly (for the
better) in R 2.0,which hasn't yet made it into Debian::testing.
I use a generic /etc/apt/sources.list with testing. Specifically, it
reads:
deb http://http.us.debian.org/debian testing main contrib non-free
deb http://non-us.debian.org/debian-non-US testing/non-US main contrib
non-free
So you don't need a line for cran.r-project.org in order to get the
stuff in testing. As you may know, Debian's policies involve a
two-week waiting period, and a lack of critical bugs reported, for a
package to make it into testing. So there's a certain innate lag in
what you see in testing. If you're a user of testing, it's because you
like that tradeoff between timelag and stability.
The Debian packages get updated automatically when one does
# apt-get update && apt-get dist-upgrade
from time to time. The stuff you get using install.packages()
doesn't. A few weeks ago I had asked Dirk how one might automate the
removal of packages that I put in, using install.packages(), which
later came out as Debian packages. I also asked how one might
automatically do an install.packages() on the stuff that is installed
on my machine but isn't yet out as a Debian package. He said this is a
bit harder than meets the eye. I haven't gone into mucking with this
yet...
On an unrelated note, here's the shell script that I use to "fetch me
everything connected with R" :
# ---------------------- snip snip snip
#!/bin/sh
apt-cache search '^r-' \
| egrep -v -i '(biology|genetic|map|odbc|sql)' \
| awk '/^r\-/ {print $1}' \
| xargs apt-get install --yes
# ---------------------- snip snip snip
In order to run it, I say:
# apt-get update && takeallR.sh
--
Ajay Shah Consultant
ajayshah at mayin.org Department of Economic Affairs
http://www.mayin.org/ajayshah Ministry of Finance, New Delhi