[BioC] Subsetting in R

michael watson (IAH-C) michael.watson at bbsrc.ac.uk
Thu Sep 18 12:22:31 MEST 2003


I don't really understand the subsetting in R.

I have a matrix of normalised M values:

matrix <- maM(norm.data)

I ran a t-test on these using multtest and combined the results into another matrix:

t <= mt.teststat(matrix, class, test="t", nonpara="y")
result = cbind(matrix, t)

So as far as I can tell i now have a matrix, "result", that has my normalised M values as columns with a final column on the end giving a non-parametric t-score for each row.

I now want to subset this matrix so that I have only, say, those rows where t > 4.  Anyone have any idea how to do this?  I have tried all sorts of combinations of [,] on result and got nowhere.  I think I am using the wrong kind of object to do subsetting on :-(

Thanks in advance for any help

Mick



More information about the Bioconductor mailing list