[R] alternative to stop()?

Robert Gentleman rgentlem at stat.auckland.ac.nz
Wed May 17 21:11:50 CEST 2000


On Wed, May 17, 2000 at 11:37:21AM -0700, Griffith Feeney wrote:
> I'm using stop to exit functions when certain arguments are specified and 
> would like to suppress the "Error in ..." that is printed to the console 
> before the message given as the argument to stop(). Is there some 
> alternative to stop that will allow this?
> 

  There are a variety of ways to do this,
 from the options help:

     error: an expression governing the handling of non-catastrophic
          errors such as those generated by `stop' as well as by
          signals and internally detected errors. The default
          expression is `NULL': see `stop' for the behaviour in that
          case. The function `dump.frames' provides one alternative
          that allows post-mortem debugging.

show.error.messages: a logical. Should error messages be printed? 
          Intended for use with `try' or a user-installed error
          handler.

    warn: sets the handling of warning messages.  If `warn' is negative

> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

-- 
+-------------------------------------------------------------------------+
| Robert Gentleman              phone : (64-9) 3737-599 ext 3946          | 
| Senior Lecturer               fax :   (64-9) 3737-018                   |
| Department of Statistics      office : Room 206 Maths/Physics           |
| University of Auckland	email : rgentlem at stat.auckland.ac.nz      |
+-------------------------------------------------------------------------+
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list