Give us the example where 'try' did not work. Something like this
should work
while(....){
1
2
try.err <- try(...code that might error)
if (try.err, 'try-error') next
3
}
On Thu, Aug 27, 2009 at 4:21 PM, kathie<kathryn.lord2000 at gmail.com>
wrote:>
> Dear R users,
>
> is there way to ignore an error and go back to 1st line?
>
> I mean,
>
>
> #-------------------------------
>
> while (or repeat) ------------
> {
> ? ? ? ?1
> ? ? ? ?2
> ? ? ? ?.
> ? ? ? ?.
> ? ? ? ?.
> ? ? ? ?6
> }
>
> #-----------------------------
>
> For example, if I have an error in the 6th line, then I'd like to go
back to
> the 1st line.
>
> I've already tried "try", but it didn't work.
>
>
> Any suggestion will be greatly appreciated.
>
> Regards,
>
> Kathryn Lord
> --
> View this message in context:
http://www.nabble.com/ignore-an-error-and-go-back-to-....-tp25179265p25179265.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Jim Holtman
Cincinnati, OH
+1 513 646 9390
What is the problem that you are trying to solve?