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

From: Jonathan Baron <baron_at_psych.upenn.edu>
Date: Sat 20 Aug 2005 - 12:48:14 EST

On 08/19/05 16:23, Paul Johnson wrote:
> 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
>
> http://support.stat.ucla.edu/view.php?supportid=30
>
> 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:
>
> #R_installAll.R
> 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)

I used to do this:

    update.packages()
    cp <- CRAN.packages()[,1]
    ip <- installed.packages()[,1,]
    install.packages(setdiff(cp,ip))

But now it looks like you can do this:

    install.packages(new.packages())

Jon

-- 
Jonathan Baron, Professor of Psychology, University of Pennsylvania
Home page: http://www.sas.upenn.edu/~baron

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Sat Aug 20 12:54:13 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:38:27 EST