Java Mailing List Archive

http://www.r-help.com/

Home » R Help for Statistical Computing »

[R] Append to outfile in R CMD BATCH mode

Turchin, Michael

2010-03-11

Replies: Find Java Web Hosting

Author LoginPost Reply
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
______________________________________________
R-help@(protected)
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
©2008 r-help.com - Jax Systems, LLC, U.S.A.