Skip to content

stop() vs. error() ?

3 messages · Liaw, Andy, ivo welch, Pierre Kleiber

#
Please do read the documentation of the functions you are trying to use.
The description in ?stop says:

     'stop' stops execution of the current expression and executes an
     error action.

stop() is how error is flagged in R (and S in general).  If that's not what
you want, try something else.  And the `something else' depends on what you
want, which has not been described in detail.

Andy
------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments,...{{dropped}}
#
hi andy:  yes, I know what it does.  My suggestion would be to have a 
different command, that is a "pure stop" without error condition (with 
its message).  A stop and an error are really two different things.

regards, /ivo
Liaw, Andy wrote:
<snip>
#
The thing is that functions don't really stop... they return.  So what you 
want is return()
  Cheers, Pierre
ivo welch wrote: