Skip to content

matching and extracting data

3 messages · ram basnet, Chuck Cleland, David Winsemius

#
On 11/27/2009 10:25 AM, ram basnet wrote:
[,1] [,2] [,3]
 [1,] "A"  "5"  "P"
 [2,] "B"  "6"  "P"
 [3,] "C"  "7"  "P"
 [4,] "D"  "5"  "Q"
 [5,] "E"  "6"  "Q"
 [6,] "F"  "7"  "Q"
 [7,] "G"  "5"  "R"
 [8,] "H"  "6"  "R"
 [9,] "I"  "7"  "S"
[10,] "J"  "5"  "S"

  
    
#
On Nov 27, 2009, at 10:25 AM, ram basnet wrote:

            
Perhaps (untested):

X[ X[,3] %in% Y[,1] , ]

Would have been tested if you had used dput or dump on your matrices.