I have two data frames df Chr Pos CaseA CaseC CaseG CaseT 10 135349878 0.000000 3.428571 0.000000 20.571429 10 135349880 0.000000 21.333333 0.000000 2.666667 10 135349883 21.000000 0.000000 3.000000 0.000000 10 135349912 0.000000 0.000000 21.000000 3.000000 10 135349913 0.000000 21.000000 0.000000 3.000000 mydf V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 10 135349459 a A 14 0 0 7 ,.,,,., bSa`^aa 10 135349878 a A 11 0 0 7 ,,,,,.. aaab^ab 10 135349877 g G 18 0 0 7 ,,,,,.. `a`_\\`b 10 135349912 g G 18 0 0 8 ,,,,,.., `_abXbba 10 135349881 a A 14 0 0 8 ,,,,..,. a`_aab_a I want to have a new data frame with all rows in mydf whose 2nd column(V2) matches the second column of df(Pos). so output of new data frame- newdf V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 10 135349878 a A 11 0 0 7 ,,,,,.. aaab^ab 10 135349912 g G 18 0 0 8 ,,,,,.., `_abXbba Can you please help me.I will be very thankful to you.