### Name: rowFtests ### Title: t-tests and F-tests for rows or columns of a matrix ### Aliases: colFtests rowFtests rowttests colttests fastT ### Keywords: math ### ** Examples x = matrix(runif(970), ncol=97) f2 = factor(floor(runif(ncol(x))*2)) f7 = factor(floor(runif(ncol(x))*7)) r1 = rowttests(x) r2 = rowttests(x, f2) r7 = rowFtests(x, f7) ## compare with pedestrian tests about.equal = function(x,y,tol=1e-10) stopifnot(all(abs(x-y) < tol)) s1 = t.test(x[1,]) about.equal(s1$statistic, r1$statistic[1]) about.equal(s1$p.value, r1$p.value[1]) s2 = t.test(x[1,] ~ f2, var.equal=TRUE) about.equal(s2$statistic, r2$statistic[1]) about.equal(s2$p.value, r2$p.value[1]) dm = -diff(tapply(x[1,], f2, mean)) about.equal(dm, r2$dm[1]) s7 = summary(lm(x[1,]~f7)) about.equal(s7$statistic$value, r7$statistic[1]) ## colttests c2 = colttests(t(x), f2) stopifnot(identical(r2, c2))