RE: [R] how to use apply on a two variable t-test

2003-12-31 Thread Simon Fear
all, Simon > -Original Message- > From: Jason Dunsmore [mailto:[EMAIL PROTECTED] > Sent: 31 December 2003 15:13 > To: [EMAIL PROTECTED] > Subject: [R] how to use apply on a two variable t-test > > > Security Warning: > If you are not sure an attachment is safe to

Re: [R] how to use apply on a two variable t-test

2003-12-31 Thread Jonathan Baron
On 12/31/03 09:12, Jason Dunsmore wrote: >does anyone know how to use the apply function on a two-variable t-test? >i've tried everything. Suppose d1 and d2 are data frames, and you want to do a t test of column 1 of d1 vs. column 1 of d2, column 2 of d1 vs. column 2 of d2, and so on. Then mappl

[R] how to use apply on a two variable t-test

2003-12-31 Thread Jason Dunsmore
does anyone know how to use the apply function on a two-variable t-test? i've tried everything. apply(data[1:4],1,t.test) # works, but only a one-variable test apply((data[1:4],data[5:9]),1,t.test) # returns a syntax error i've also tried using the for loop: for (i in 1:1000) t.test(data[i,1:4],