[BioC] mean of individual rows for subsets of columns in an ExprSet

Vincent Carey 525-2265 stvjc at channing.harvard.edu
Wed Aug 20 11:51:51 MEST 2003


>
> I am sorry to disturb with yet a simple question but I have tried my best and have now given up on solving it myself... :(
>
> I wonder if somebody knows how I easily can create mean values and their SD from subsets of columns (representing cases) over all rows individually (representing the genes) from an object - eset - (which is an Expression Set with 12625 genes, 7 samples).
> E.g the mean and SD from all rows individually in columns 4,5,6 and 7 of my data?
>
> Grateful for help!
>
> // Anna :o)

mns <- apply(exprs(eset)[,4:7],2,mean)
sds <- apply(exprs(eset)[,4:7],2,function(x)sqrt(var(x)))



More information about the Bioconductor mailing list