>>>>> "ML" == Mark Leeds <[EMAIL PROTECTED]> >>>>> on Wed, 29 Oct 2008 17:13:04 -0500 (CDT) writes:
ML> Hi Phil: That's EXACTLY what it is. Thanks so much. It's nice to know ML> that the R Gods don't hate me. I hope it's okay that I'm going to cc ML> r-help ML> in case this thread comes up in the future and also so that other people ML> who might want to help know that it's solved. Thanks again. another note below, "just for the archives i.e. future reference": ML> On Wed, Oct 29, 2008 at 5:01 PM, Phil Spector wrote: >> Mark: >> >>> delete workspace? (y/n): print("test of batch\n") >> >> It looks like you've got something in your .Rprofile or .First >> that's causing R to prompt you about saving your workspace, and >> it's interpreting your program as that response. >> >> Try >> >> R --no-save --vanilla CMD BATCH test.r test.out A mini-remark: I'd recommend *dropping* the final 'test.out', such that R will automatically use test.Rout and the *.Rout ending is automagically recognized by an ESS-enabled emacs [as "R Transcript file"] and maybe similarly by other R-aware editors. Martin >> - Phil >> On Wed, 29 Oct 2008, [EMAIL PROTECTED] wrote: >> >>> I usually just run my R programs at the R command prompt but for my >>> latest one I want to save any output that gets written to the screen >>> so I am >>> trying to use R CMD BATCH and send the output to an output file. I >>> realize I could use sink at the prompt but I'd rather try to do it >>> this way >>> because I know that I used to do this in S+. >>> >>> So, I wrote a simple one line program called test.R which is below. >>> >>> print("test of batch\n") >>> >>> Then I did >>> >>> R CMD BATCH temp.R temp.out >>> >>> temp.out which is shown below then ends up containing all my loading >>> up messages and a proc.time statement at the very bottom but not >>> the print statement itself ? Does someone know what I'm doing wrong. >>> I've looked around but I can't find anything that answers my >>> question. My sessionInfo() is at ther very bottom of this email. >>> Thanks. ........................ ______________________________________________ R-help@r-project.org mailing list 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.