Skip to content

How to extract x rows to get x pvalues using t.test

2 messages · Jagarlamudi, Choudary, Adaikalavan Ramasamy

#
You will need to _apply_ the t-test row by row. 

   apply( genes, 1, function(x) t.test( x[1:2], x[3:4] )$p.value )

apply() is a C optimised version of for. Running the above code on a
dataset with 56000 rows and 4 columns took about 63 seconds on my 1.6
GHz Pentium machine with 512 Mb RAM. See help("apply") for more details.

Regards, Adai
On Tue, 2005-03-15 at 11:59 -0600, Jagarlamudi, Choudary wrote: