Re: [R] Deleting multiple rows from a data matrix based on exp value

2011-11-21 Thread R. Michael Weylandt
Inline. On Mon, Nov 21, 2011 at 5:41 AM, Peter Davidsen wrote: > Hi, > > Thanks for the quick reply. > However, your suggestion doesn't solve the problem I'm afraid (i.e > dim(Matrix) still the same). What I want is to reduce the number of > rows (probesets) markedly based on their normalized int

Re: [R] Deleting multiple rows from a data matrix based on exp value

2011-11-21 Thread Peter Davidsen
Hi, Thanks for the quick reply. However, your suggestion doesn't solve the problem I'm afraid (i.e dim(Matrix) still the same). What I want is to reduce the number of rows (probesets) markedly based on their normalized intensity - thus I've chosen a cut-off of 1.11 When I run your code (as well a

Re: [R] Deleting multiple rows from a data matrix based on exp value

2011-11-20 Thread Dennis Murphy
Without a reproducible example this is just a guess, but try Matrix[apply(Matrix, 1, function(x) any(x > 1.11)), ] This will retain all rows of Matrix where at least one value in a row is above the threshold 1.11. If that doesn't do what you want, please provide a small reproducible example and a

[R] Deleting multiple rows from a data matrix based on exp value

2011-11-20 Thread Peter Davidsen
Dear List, I have a data matrix that consists of ~4500 rows and 25 columns (i.e. an exprSet object that I converted via the 'exprs' function into a data matrix) Now I want to remove/delete the rows where all exp. values in that particular row are below or equal to a specific cut-off value (e.g 1.