Hi, Is there any way that I can supress error messages so that they don't stop for loops running?
I'm using the gstat package and have created a variogram model for the double exponential model: "dexp <- vgm( .5, "Exp", 10,.1, add.to = vgm(.5, "Exp", 100))" and fitted it using "dexp.fit <- fit.variogram(temp2, dexp, fit.method=6, debug.level=0)" Occasionally I get the following error message and the model doesn't fit "Error in if (direct[direct$id == id, "is.direct"] && any(model$psill < : missing value where TRUE/FALSE needed" I don't mind that the model doesn't converge, however the error message stops the for loop I'm running at the time (and so stops my code!). Is there any way that I can suppress the error message? Sorry if this is a really simple question, I'm still new to r programming! Best wishes Helen Greatrex -- View this message in context: http://www.nabble.com/Suppressing-error-messages-in-a-for-loop-tp20016800p20016800.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.