[R] Advice about system for installing & updating all R package in a Linux Lab?

From: Paul Johnson <pauljohn_at_ku.edu>
Date: Sat 20 Aug 2005 - 07:23:30 EST

Good day:

I'm administering 6 linux systems (FC4) in a student lab and worry that users may want packages that are not installed. I get tired of adding them one by one. Then I happened upon this page


about installing all R packages from CRAN. That did not run as it was, but after some fiddling I arrived at the following script, which does run and it builds many packages and reports failures on the rest:

options(repos = "http://lib.stat.cmu.edu/R/CRAN/") update.packages(ask=F)
x <- packageStatus(repositories="http://cran.r-project.org/src/contrib") st <- x$avai["Status"]
install.packages(rownames(st)[which(st$Status=="not installed")], dependencies=T)

If I run that in batch mode (as root, of course)

> R CMD BATCH R_installAll.R

It produces some informative output. Some packages don't build because they are for Windows. As Prof Ripley mentioned recently, some packages don't build because of gcc-4.0.1. Some fail because I don't have some requisite libraries installed. I try to deduce which FC packages may be used to fix that and iterate the process now and then.

But, for the most part, the packages to be OK (as far as I can tell). The output of a recent update is posted on the net here, in case you are interested to see (this lists the ones that don't build plus the successful updates):


I can't see how this does any damage, since the packages that don't build are very graceful about erasing themselves, and the ones that do build are automatically available for the users.

Can you see any downside to scheduling this process to run as a cron job, say once per week, to keep packages up to date?

Paul E. Johnson                       email: pauljohn@ku.edu
Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66044-3177           FAX: (785) 864-5700

R-help@stat.math.ethz.ch mailing list
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Sat Aug 20 07:29:23 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:55 EST