I would like to make a new data frame which only includes common rows of two separate data.frame. example:
data.frame 1
1 id300 2 id2345 3 id5456 4 i
common <- intersect(data.frame1$col, data.frame2$col) data.frame1[common,] # give you common rows in data frame 1 data.frame2[common,] # give you common rows in data frame 2