[R] Automatic re-looping after error
Thomas Lumley
tlumley at u.washington.edu
Thu Oct 9 20:51:18 CEST 2003
On Thu, 9 Oct 2003 Ted.Harding at nessie.mcc.ac.uk wrote:
> All that's really needed to cope with the situation is for R to
> drop that cycle of the loop, and resume with a new cycle.
>
> However, I'm wondering how to set this up. I've had a look at
> try(), and I'm not at all sure that it does what I would want.
> What I'd really like is something (inside the loop) on the lines of
>
> on.error(maybe some parameters X) break
>
> where X might specify what sort of error or what function it comes
> from. Would setting
>
> options(error = break )
>
I don't think so. You may need to look at the new exception-handling code
(start with help(tryCatch)).
-thomas
More information about the R-help
mailing list