[R] Ignore error t.test in a loop

Christian Ritz ritz at life.ku.dk
Sat Feb 2 14:23:06 CET 2008


Hi,

have a look at ?try which leads to using a construct of the following 
form:

myTtest <- try(t.test(...))
if (inherits(myTtest, "try-error"))
{
     cat(myTtest)
     myTtest <- NA
}


Christian



More information about the R-help mailing list