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