Entering edit mode
Straubhaar, Juerg
▴
300
@straubhaar-juerg-391
Last seen 10.3 years ago
I have an (n,m) matrix with rownames and colnames. The rownames are
probe set ids. I know a value of one of the probe sets which is, say,
in column 2 of the matrix. I would like to retrieve the rowname, or
probe set id, of the row which contains this value.
Neither of these work:
matrix[,matrix[,2]==513.193057]
(Error: (subscript) logical subscript too long)
index <- which(matrix[,2] == 513.193057)
matrix[index,]
Of course, I could write.table() the matrix and search the file. But I
would like to know how this is done in R/Bioconductor.
Thank you very much.
Juerg Straubhaar,
Umass Med