[R] How best to deal with returned errors?

From: Quin Wills <quin.wills_at_googlemail.com>
Date: Wed 19 Jul 2006 - 03:31:40 EST


What is the best general strategy to prevent returned errors from interrupting whatever it is I am running? Only by using options()?  

This is a problem for me in 2 particular cases:

(i) An error breaking my loops.

(ii) I would like to run some regressions where it
automatically will try a specified number of increasingly robust options until the regression doesnít fail.  

Using try(), especially for the second case, seems a bit clunky for my needs. As Iíve never really automated the handling of my errors I was wondering if there is perhaps a bit of simple wisdom or pointers in the right direction on the matter.  




Checked by AVG Free Edition.


	[[alternative HTML version deleted]]

______________________________________________ R-help@stat.math.ethz.ch 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.

Received on Wed Jul 19 03:46:35 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 19 Jul 2006 - 04:22:37 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.