# [BioC] T test across columns

Adaikalavan Ramasamy ramasamy at cancer.org.uk
Tue Jul 26 23:43:34 CEST 2005

```I do not understand why one wants to compare if the arrays are behaving
differently given the fact we assume that majority of the genes are not
differentially expressed. Isn't this the assumption behind most
preprocessing methods ?

But if you want to do this anyway, you might as well use the paired=TRUE
option to test if the differences between two arrays are zero.

t.test( C[ ,1] , C[ ,2], paired=TRUE )

On Tue, 2005-07-26 at 16:31 -0400, Naomi Altman wrote:
> 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
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
>

```