OK, my journey to make lab machines automagically install & update all desirable R packages is nearing an end! The only question I have now is this: How can I control where the system prints the *.Rout file that is created automatically when the R batch program runs. In "man R" I don't find any information about it. When the cron job runs "R_installAll.sh" (see below), I'd like to re-direct it to someplace that ordinary users can read. Here's the shell script I will schedule with cron ------------R_installAll.sh ---------- #!/bin/bash R CMD BATCH /usr/local/bin/R_installAll.R -------------------------------------- And here's the R program -------------R_installAll.R------------- # Paul Johnson <pauljohn _AT_ ku.edu> 2005-08-31 # This should update and then install all packages, except for # ones I exclude because they don't work or we don't want them. options(repos = "http://lib.stat.cmu.edu/R/CRAN/") update.packages(ask=F) theNew <- new.packages() failPackages <- c("BRugs","GDD","gtkDevice","gap","gnomeGUI","mimR","ncdf","pathmix","rcdd","rgdal","rpvm", "Rmpi","RQuantLib","RMySQL", "RNetCDF","RODBC","ROracle","RScaLAPACK","rsprng","RWinEdt","taskPR") shouldFail <- theNew %in% failPackages install.packages( theNew[!shouldFail],dependencies=T) # VGAM is not in CRAN yet, but Zelig wants it. # install.packages("VGAM", CRAN="http://www.stat.auckland.ac.nz/~yee"); update.packages(CRAN="http://www.stat.auckland.ac.nz/~yee") -------------------------------------- -- Paul E. Johnson email: pauljohn at 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
Paul Johnson wrote:> OK, my journey to make lab machines automagically install & update all > desirable R packages is nearing an end! The only question I have now is > this: How can I control where the system prints the *.Rout file that is > created automatically when the R batch program runs. In "man R" I don't > find any information about it. When the cron job runs "R_installAll.sh" > (see below), I'd like to re-direct it to someplace that ordinary users > can read.But you find help in R CMD BATCH --help which tells you: "Usage: R CMD BATCH [options] infile [outfile]" Hence simply call R by something like R CMD BATCH /usr/local/bin/R_installAll.R /path/to/R_installAll.Result Uwe Ligges> Here's the shell script I will schedule with cron > > ------------R_installAll.sh ---------- > #!/bin/bash > R CMD BATCH /usr/local/bin/R_installAll.R > -------------------------------------- > > And here's the R program > > -------------R_installAll.R------------- > > # Paul Johnson <pauljohn _AT_ ku.edu> 2005-08-31 > # This should update and then install all packages, except for > # ones I exclude because they don't work or we don't want them. > > > options(repos = "http://lib.stat.cmu.edu/R/CRAN/") > > update.packages(ask=F) > theNew <- new.packages() > failPackages <- > c("BRugs","GDD","gtkDevice","gap","gnomeGUI","mimR","ncdf","pathmix","rcdd","rgdal","rpvm", > "Rmpi","RQuantLib","RMySQL", > "RNetCDF","RODBC","ROracle","RScaLAPACK","rsprng","RWinEdt","taskPR") > > shouldFail <- theNew %in% failPackages > > install.packages( theNew[!shouldFail],dependencies=T) > > > # VGAM is not in CRAN yet, but Zelig wants it. > # install.packages("VGAM", CRAN="http://www.stat.auckland.ac.nz/~yee"); > > > update.packages(CRAN="http://www.stat.auckland.ac.nz/~yee") > -------------------------------------- > > > >
Apparently Analagous Threads
- Problems in package management after Linux system upgrade
- cron job install/update problems: tcltk can't find display (installing e.g., pbatR)
- cron job install/update problems: tcltk can't find display (installing e.g., pbatR)
- Advice about system for installing & updating all R package in a Linux Lab?
- can I use acts_as_list with a has_many :through association