Skip to content

How to suppress the printing of warnings (Windows)?

2 messages · Jacho-Chavez,DT (pgr), Brian Ripley

#
I'm running R v2.0.0 on Windows 2000. The command options(warn=-1) did the trick. However, is there a way I may also stop these warnings from printing on my screen while using R interactively. I am working with the LOCFIT library.

I'm also planning to run my simulations in my department's Unix machine (R v1.9.0) in batch mode, would `option(warn=-1)' do the trick there as well?

David

-----Original Message-----
From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk]
Sent: 11 April 2005 13:48
To: Jacho-Chavez,DT (pgr)
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] How to suppress the printing of warnings (Windows)?
On Mon, 11 Apr 2005, Jacho-Chavez,DT (pgr) wrote:

            
options(warn=-1)

However, warnings and errors are sent to stderr not stdout except on 
obselete versions (95/98/ME) of Windows, and so not redirected by that 
sink() call. For me (Windows XP)
Warning message:
test

as expected.  So is this an obsolete version of Windows or a very old 
version of R?
#
On Mon, 11 Apr 2005, Jacho-Chavez,DT (pgr) wrote:

            
Then sink() is not sinking warnings on that OS, so something else is 
wrong.

Yes, option(warn=-1) works in interactive sessions too.
Yes.