search for: onlytwo

Displaying 1 result from an estimated 1 matches for "onlytwo".

2008 Aug 13
5
subsetting matrix according to columns with character index
Hi, I have a long matrix of the following form which I would like to subset according to the third column: [x y z]: a1 c1 1 a1 c1 2 a2 c1 1 a1 c2 1 a1 c2 2 . . . The first two columns a characters ai and cj. I would like to keep all the rows where there are two entries for z, 1 and 2. That is, I want: a1 c1 1 a1 c1 2 a1 c2 1 a1 c2 2 . . . I try to use something like