[R] controlling where *.Rout gets printed. Possible?

Paul Johnson pauljohn at ku.edu
Thu Sep 1 18:51:16 CEST 2005


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




More information about the R-help mailing list