Re: [R] how to get the rows that satisfy a specific condition

2014-09-29 Thread Fix Ace
Sorry for my confusing question. Thanks for all the inputs. I think Sven E. Templer gave the answer I needed... On Sunday, September 28, 2014 4:51 AM, Sven E. Templer wrote: in ?which read about arr.ind following jims assumption (column instead of row indices is what you want) t

Re: [R] how to get the rows that satisfy a specific condition

2014-09-28 Thread Sven E. Templer
in ?which read about arr.ind following jims assumption (column instead of row indices is what you want) this also works: m <- matrix(1:20,4) unique(which(m>11, arr.ind = T)[,"col"]) On 27 September 2014 12:23, Jim Lemon wrote: > On Fri, 26 Sep 2014 10:15:14 PM Fix Ace wrote: >> Hello, there, >>

Re: [R] how to get the rows that satisfy a specific condition

2014-09-27 Thread Jim Lemon
On Fri, 26 Sep 2014 10:15:14 PM Fix Ace wrote: > Hello, there, > I wonder if there is an easier way that I would only get the rows that > satisfies some condition. For example:I have the following matrix, and I > would like to output only the 3rd row and 4th row, since only these two > rows contain

[R] how to get the rows that satisfy a specific condition

2014-09-26 Thread Fix Ace
Hello, there, I wonder if there is an easier way that I would only get the rows that satisfies some condition. For example:I have the following matrix, and I would like to output only the 3rd row and 4th row, since only these two rows contain the numbers greater than 11 > a [,1] [,2] [,3] [