[R] stop() vs. error() ?
Liaw, Andy
andy_liaw at merck.com
Sat Mar 27 01:41:02 CET 2004
So you still have not told us what exactly what you are looking for. What
do you want some sort of stop() to do inside a function, that is neither an
error nor returning? Can you show an example in some other language that
has such a feature?
Andy
> From: ivo welch [mailto:ivo.welch at yale.edu]
>
> Hi jim: ahhh, but then the error messages are off for "real errors"
> that occur later.
>
> Hi pierre: a return() in a (2nd-level) function can be
> different from a
> stop(). one could argue about whether it should be possible
> to stop()
> in a function of course, without it being an error().
>
> regards,
>
> /iaw
>
>
> James MacDonald wrote:
> > And a closer examination of the help page would lead you to this:
> >
> > options(show.error.messages=FALSE)
> > stop()
> >
> > which is what I believe you want....
> >
> > Jim
>
>
> also From Pierre Kleiber:
>
> The thing is that functions don't really stop... they return.
> So what
> you want is return()
> Cheers, Pierre
>
>
More information about the R-help
mailing list