Hi, I'm interested in using apply() with t.test() on a data.frame.

Specifically, I'd like to use apply() to do the following:

 t.test(raw.sample[1,alive],raw.sample[1,dead])
t.test(raw.sample[2,alive],raw.sample[2,dead])
 t.test(raw.sample[3,alive],raw.sample[3,dead])
etc.

I tried the following,

apply(raw.sample,1,function(x) t.test(raw.sample[,alive],raw.sample[,dead]))

but it gives me a list of identical results.


Thanks,
Andrew

	[[alternative HTML version deleted]]

