Check out ?try and ?trycatch .
THose are specifically designed to allow you to take note of an error
condition while still running your function/script.
------<quote>---------
From: Laura Antolini <laura.antolini_at_unimib.it>
Date: Tue, 12 Apr 2011 19:23:44 +0200
Dear R users,
I am in trouble using the function
solve(matrix)
in a loop.
When it happens that I have a singular matrix, I get an error message
saying so and the loop stops.
My question is if there in any way to keep on going in the loop.
Thank you in advance,
Laura
*---------------------------------------------------------*
Laura Antolini, PhD
Department of Clinical Medicine and Prevention
University Milano-Bicocca
Monza - Italy
______________________________________________
R-help@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.