[R] continue for loop in case of erros

Gabor Grothendieck ggrothendieck at gmail.com
Tue Oct 9 22:24:28 CEST 2007


It might be an idea to add Katherine Mullen's answer earlier in this
thread to the FAQ too.

   https://stat.ethz.ch/pipermail/r-help/2007-October/142807.html

On 10/9/07, Thomas Lumley <tlumley at u.washington.edu> wrote:
>
> It's a FAQ: 7.32.
>
>        -thomas
>
> On Tue, 9 Oct 2007, Irene Mantzouni wrote:
>
> > Dear all,
> >
> > I have a for loop which includes nls model estimation.
> > The loop breaks after the first non-convergence error.
> > How can I make the loop continue and try to estimate all models?
> > I suppose it should be sth like: if(...) { next }
> > but I have no idea how to setup the arguements...
> >
> > Thank you!
> >
> > Irene
> >
> >
> > ______________________________________________
> > 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.
> >
>
> Thomas Lumley                   Assoc. Professor, Biostatistics
> tlumley at u.washington.edu        University of Washington, Seattle
>
> ______________________________________________
> 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.
>



More information about the R-help mailing list