[R] how to stop without error message?

Mark.Bravington at csiro.au Mark.Bravington at csiro.au
Tue Nov 11 04:09:38 CET 2008


> > Dear list
> >
> > Can anyone suggest a simple way to abort execution like stop(...) does, but without issuing an "Error: ..." message?
> >
> > I don't want to set 'options( show.error.messages=TRUE)' because I want normal behaviour to resume after this particular stop.
>
> What's wrong with return() ?
>
> Hadley

I should have been clearer, sorry-- I'm trying to exit from an "inner" function which might be several levels deep, returning straight to the R prompt. To be specific, I'm trying to clean up the "No Error in..." message in my 'debug' package-- the "No " prefix being my original workaround to avoid an unnecessarily alarming message.

bye
Mark


--
Mark Bravington
CSIRO Mathematical & Information Sciences
Marine Laboratory
Castray Esplanade
Hobart 7001
TAS

ph (+61) 3 6232 5118
fax (+61) 3 6232 5012
mob (+61) 438 315 623



More information about the R-help mailing list