[R] capture stderr in Windows

2005-08-29 Thread Joan Carles Pineda Arredondo

OK running in W2K.

Very thanks.

_
Mensaje analizado y protegido, tecnologia antivirus www.trendmicro.es

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] capture stderr in Windows

2005-08-29 Thread Duncan Murdoch
On 8/29/2005 1:49 PM, Joan Carles Pineda Arredondo wrote:
 OK running in W2K.

You need to give some detail to your question.  Do you want to capture 
stderr output from Rterm?  Do you want R to capture stderr output from 
some other program?

Duncan Murdoch

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] capture stderr in Windows

2004-08-16 Thread Moises Hassan
I'm using the following command to run R in Windows

 

Rterm --no-save --no-restore  Rscriptfile  Rstdoutfile

 

How can I capture the text sent by R to stderr in a file?

 

Thanks, 

   - Moises

 


[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] capture stderr in Windows

2004-08-16 Thread Uwe Ligges
Moises Hassan wrote:
I'm using the following command to run R in Windows
 

Rterm --no-save --no-restore  Rscriptfile  Rstdoutfile
 

How can I capture the text sent by R to stderr in a file?
Rterm --no-save --no-restore  Rscriptfile 21 Rstdoutfile
I'd rather use R CMD BATCH anyway.
Uwe Ligges
 

Thanks, 

   - Moises
 

[[alternative HTML version deleted]]
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] capture stderr in Windows

2004-08-16 Thread Duncan Murdoch
On Mon, 16 Aug 2004 10:25:08 -0700, Moises Hassan
[EMAIL PROTECTED] wrote :

I'm using the following command to run R in Windows

 

Rterm --no-save --no-restore  Rscriptfile  Rstdoutfile

 

How can I capture the text sent by R to stderr in a file?

That depends on your shell.  The standard Windows command shell
COMMAND.COM or CMD.EXE provides no easy way to do this.  There are
lots of replacement shells around that can do it; I use Cygwin's bash
shell most of the time.

There are also programs on the net that do nothing but redirect
standard handles, e.g. http://www.commandline.co.uk/mtee/index.html.
I've never tested these.

Duncan Murdoch

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] capture stderr in Windows

2004-08-16 Thread Duncan Murdoch
I wrote the message below, but it's just plain wrong.

The CMD.EXE shell in Win XP (and 2K?) allows redirection of stderr in
the usual Unix style:

  Rterm --no-save --no-restore  Rscriptfile  Rstdoutfile
2Rstderrfile

You can also use 21 to redirect stderr into the stdout stream, so
both go to Rstdoutfile.

Duncan Murdoch


On Mon, 16 Aug 2004 10:25:08 -0700, Moises Hassan [EMAIL PROTECTED] wrote :

I'm using the following command to run R in Windows

 

Rterm --no-save --no-restore  Rscriptfile  Rstdoutfile

 

How can I capture the text sent by R to stderr in a file?

That depends on your shell.  The standard Windows command shell COMMAND.COM or 
CMD.EXE provides no easy way to do this.  There are lots of replacement shells around 
that can do it; I use Cygwin's bash shell most of the time.

There are also programs on the net that do nothing but redirect standard handles, 
e.g. http://www.commandline.co.uk/mtee/index.html. I've never tested these.

Duncan Murdoch

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] capture stderr in Windows

2004-08-16 Thread Prof Brian Ripley
On Mon, 16 Aug 2004, Duncan Murdoch wrote:

 The CMD.EXE shell in Win XP (and 2K?) allows redirection of stderr in
 the usual Unix style:

(Yes, all NT-based versions of Windows.)

   Rterm --no-save --no-restore  Rscriptfile  Rstdoutfile
 2Rstderrfile
 
 You can also use 21 to redirect stderr into the stdout stream, so
 both go to Rstdoutfile.

[But the order matters, so first redirect stdout and then redirect stderr 
to stdout.]

And for completeness, 

1) Under non-NT Windows (95/98/ME) stderr is the same as stdout since its 
shells don't know about stderr.

2) This is in all the rw-FAQ, Q2.10

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html