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

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


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

myTtest <- try(t.test(...))
if (inherits(myTtest, "try-error"))

     myTtest <- NA


Christian mailing list PLEASE do read the posting guide 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 Please read the posting guide before posting to the list.

list of date sections of archive