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.
(Please reply personally as well as to
: [R] how to stop without error message?
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
] [mailto:[EMAIL PROTECTED]
Sent: November-10-08 8:22 PM
To: [EMAIL PROTECTED]; R-help@r-project.org
Subject: RE: [R] how to stop without error message?
Hi John
Using 'on.exit' to reset the show.error.messages option should work, but
it
doesn't quite... and I'm not sure why.
It breaks down
On Mon, Nov 10, 2008 at 4:42 PM, [EMAIL PROTECTED] wrote:
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
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
Not sure if this qualifies as simple but you can use callCC to force an
exit from within an inner call. In this example we call f which calls f1
which calls f2 and then f2 exits right out to the top level returning 0.
Note that f2 must know about g:
f - function(g) {
f1 - function() {
(+61) 3 6232 5012
mob (+61) 438 315 623
-Original Message-
From: hadley wickham [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 11 November 2008 2:20 PM
To: Bravington, Mark (CMIS, Hobart)
Cc: R-help@r-project.org
Subject: Re: [R] how to stop without error message?
I should have been clearer
-Original Message-
From: John Fox [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 11 November 2008 10:35 AM
To: Bravington, Mark (CMIS, Hobart); R-help@r-project.org
Subject: RE: [R] how to stop without error message?
Dear Mark,
How about something like this?
f - function(x){
+ if (x 0
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() ?
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: November-10-08 8:22 PM
To: [EMAIL PROTECTED]; R-help@r-project.org
Subject: RE: [R] how to stop without error message?
Hi John
Using 'on.exit' to reset the show.error.messages option should work, but
it
doesn't quite... and I'm not sure why
10 matches
Mail list logo