Re: [R] Reg : using two different matrix : how to do t.test

2007-11-21 Thread Moshe Olshansky
Since t.test takes much more time than parsing loop, I won't hesitate to do a loop on the columns. --- sata pinal [EMAIL PROTECTED] wrote: I have two matrix with same dimensions. I want to do t.test using each column from 2 different matrix. Row n Column names in both matrix are same.

Re: [R] Reg : using two different matrix : how to do t.test

2007-11-21 Thread Weiwei Shi
sapply(1:4000, function(k){ t.test(Matrix1[,k], Matrix2[,k])$p.value }) I did not test, though. HTH, Weiwei On 11/19/07, sata pinal [EMAIL PROTECTED] wrote: I have two matrix with same dimensions. I want to do t.test using each column from 2 different matrix. Row n Column names in both

[R] Reg : using two different matrix : how to do t.test

2007-11-19 Thread sata pinal
I have two matrix with same dimensions. I want to do t.test using each column from 2 different matrix. Row n Column names in both matrix are same. e.g. Matrix1 id VC1 VC2 VC3 R 1 2 3 R1 4 5 6 R3 7 8 9 Matrix2 id VC1 VC2 VC3 R 10 11 12 R1 13 14 15 R3 16