Hello R users,

I have two data sets like the following. Form of dataset:

data:

      X1       X2        X3    X4       X5
     1902       RE        3      594        9
      1903       RE        3     1340        7
      1904       AA        3      760       14
      1908       RE        4     1759       18
      1909       EX        2      387        1
      2901       AU        6     3116        2
      3801       AA        1      304       29
    3902       RE        5     2482        6

I need to select rows of a data set based on the common observations of X1. 
Using intersect command I got the common observations of X1 from the two data 
sets as:

common=c(1902, 1904, 1908, 1909, 3801).

Using subset command I can select portions separately. But in general if I am 
given this type of dataset - "data" with large number of rows and also a list of 
X1 - "common" containing many elements, can anyone please let me know  how to 
select portion of the data whose X1 values are same as common values.

If any questions let me know.

Shant.
	[[alternative HTML version deleted]]

