Hi, First problem: > test <- matrix(c(1,1,2,1), 2,2) > apply(test, 1, function(x) { t.test(x) $p.value }) Error in t.test.default(x) : data are essentially constant
Second problem: > test <- matrix(c(1,0,NA,1), 2,2) > apply(test, 1, function(x) { t.test(x) $p.value }) Error in t.test.default(x) : not enough 'x' observations How to make t-test ignores this errors ? [[alternative HTML version deleted]] ______________________________________________ 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.