[R] batch file output

Mikkel Grum mi2kelgrum at yahoo.com
Tue Dec 28 16:38:46 CET 2010


Thanks. The way I run it, I can determine what version of R to run with which script. Don't know how to do that with R CMD BATCH.

Placing options(echo = FALSE) in the infile solves my problem. I got that from the page you linked to.

Mikkel

--- On Tue, 12/28/10, David Winsemius <dwinsemius at comcast.net> wrote:

> From: David Winsemius <dwinsemius at comcast.net>
> Subject: Re: [R] batch file output
> To: "David Winsemius" <dwinsemius at comcast.net>
> Cc: "Mikkel Grum" <mi2kelgrum at yahoo.com>, r-help at r-project.org
> Date: Tuesday, December 28, 2010, 8:30 AM
> 
> On Dec 28, 2010, at 8:27 AM, David Winsemius wrote:
> 
> > 
> > On Dec 28, 2010, at 8:09 AM, Mikkel Grum wrote:
> > 
> >> I run a batch file with the following command in
> Windows XP:
> >> 
> >> C:\R\R-2.12.1\bin\Rterm.exe --no-save --no-restore
> <C:\users\me\file.R> C:\users\me\file.out 2>&1
> >> 
> >> Is there any way to get only the output of R in
> file.out, without getting all the code from file.R too?
> > 
> > Put a sink(file="C:\users\me\file2.out")
> 
> Would probably work better to use forward slashes.
> 
> > in the file.R would be one way but your general
> strategy looks a bit strange. One does not generally use the
> interactive version of R for batch execution. See:
> > 
> > http://stat.ethz.ch/R-manual/R-patched/library/utils/html/BATCH.html
> > 
> > --
> 
> David Winsemius, MD
> West Hartford, CT
> 
>



More information about the R-help mailing list