[BioC] T test across columns
Naomi Altman
naomi at stat.psu.edu
Tue Jul 26 22:31:28 CEST 2005
The absolutely simplest thing would be
t.test(C[,1],C[,4])
t.test(C[,2],C[,5])
t.test(C[,3],C[,6])
Why spend a lot of time figuring out clever ways to do something, when you
only want to do 3 tests?
--Naomi
p.s. If you need to repeat this on many matrices, C, write a small function
with the 3 lines above.
At 03:59 PM 7/26/2005, mark salsburg wrote:
> > ok I created a matrix C with
> >
> > A B D A1 B1 D1
> > ..................................
> > .................................
> >
> > the columns contain the gene expression values for tissues...
> >
> > I ran the following t.test:
> >
> > apply(C, 1, function(x) t.test( x[1:3], x[4,6] )$p.value )
> >
> > which outputs out 16063 pvalues (the number of rows)
> >
> > I just want to output 3 pvalues showing if A's column is different from
> A1 etc..
> >
> > any help would be great.. thank you..
> >
>
>_______________________________________________
>Bioconductor mailing list
>Bioconductor at stat.math.ethz.ch
>https://stat.ethz.ch/mailman/listinfo/bioconductor
Naomi S. Altman 814-865-3791 (voice)
Associate Professor
Bioinformatics Consulting Center
Dept. of Statistics 814-863-7114 (fax)
Penn State University 814-865-1348 (Statistics)
University Park, PA 16802-2111
More information about the Bioconductor
mailing list