Skip to content

T-test by groups

3 messages · Ingrid Tohver, Uwe Ligges, Peter Dalgaard

#
Ingrid Tohver wrote:
I guess you want

by(error, error['Site'], function(dat) t.test(dat$diff20, dat$diff40))

Uwe Ligges
#
Uwe Ligges wrote:
...and most likely also, paired=TRUE. Notice that the data= argument
only works for the formula interface, which is not (yet) defined for
paired data, but only for the y~group type two-sample case.