Re: [R] Ignore error t.test in a loop

From: Christian Ritz <ritz_at_life.ku.dk>
Date: Sat, 02 Feb 2008 14:23:06 +0100

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



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 Sat 02 Feb 2008 - 15:31:27 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 02 Feb 2008 - 16:30:10 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