Hi - I am looping over a structural equation model for a variety of datasets. Occasionally, the model returns an error and the loop then breaks. I'd like to set a condition which says something like "if error, then print NAs" rather than the loop breaking, but I don't know how to say "if error".
I'm sure there's a simple answer; I've tried searching Nabble, but error as a hitword comes up rather often on Nabble lists :)
-- View this message in context: http://r.789695.n4.nabble.com/How-to-say-if-error-tp2266619p2266619.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.Received on Thu 24 Jun 2010 - 13:13:44 GMT
Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Archive generated by hypermail 2.2.0, at Thu 24 Jun 2010 - 13:20:35 GMT.
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.
list of date sections of archive