[R-sig-eco] error capture
Kingsford Jones
kingsfordjones at gmail.com
Mon May 5 18:48:05 CEST 2008
FAQ 7.32 indicates why 'tryCatch' may be preferable to 'try' for this
sort of thing:
http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-capture-or-ignore-errors-in-a-long-simulation_003f
Kingsford Jones
On Sun, May 4, 2008 at 9:52 PM, Tim Reid <treid at utas.edu.au> wrote:
> Hi all,
>
> I am currently running some R code bootstrapping some data and
> running GLMs on the sampled data sets. Occasionally the data sets
> that are sampled cause errors in the GLM (usually with the message
> "Error in solve.default(as.matrix(fit$hessian)) "). Currently, if
> this occurs, the program stops and exits. I would like to know if
> there is a way I can instead of having the program terminate, to get
> the program to step through that problem and continue further on in
> the program (i.e. getting it to re-sample the data again).
>
> Any help would be much appreciated,
> tim.
>
>
> -----------------------------------------------------------------------
> Tim Reid | PhD Candidate
>
> Quantitative Marine Sciences/ Antarctic Wildlife Research Unit
> School of Zoology
> University of Tasmania
> PO Box 252-05
> Hobart Tasmania 7001
> Australia
>
> phone: +61 3 6226 2594 | mob: 0404 668 363
> www.zoo.utas.edu.au/awru/
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
More information about the R-sig-ecology
mailing list