[R] Append to outfile in R CMD BATCH mode
Turchin, Michael
Michael.Turchin at childrens.harvard.edu
Thu Mar 11 23:27:35 CET 2010
Is there a way to append to the outfile when using R CMD BATCH? My code, right now, is:
R CMD BATCH --slave --vanilla '--args place .2 -.1 .9 .6' StratificationSimulation example.output
Everything else is working the way I'd like it. The first few lines of code of my script file are:
options(echo=FALSE)
cmd_args = commandArgs()
print (cmd_args)
#d <- read.table("/dev/stdin")
if that helps any. However, I cannot currently change the output to append, rather than override, the designated outfile. Maybe I could potentially use sink(__, append=TRUE) if I could somehow reference the outfile from within the script (and assuming my understanding of sink() is correct)?
Any thoughts, or help? They're all greatly appreciated.
Thanks!
~Michael
Children's Hospital Boston
The Broad Institute
More information about the R-help
mailing list