I have df1 df1 :
X1 X2 1 12345678 2 400454 3 12345214 4 77753523 5 77753827 And there is df2 :
X1 X2 X3 1 123 1 2 125 5 3 400 2 4 643 3 5 423 4 6 765 5 7 213 6 8 124 2 9 777 9 10 432 1 I want to make it so that 3 column df1 in df1 - df1$X3 with values corresponding to df2$X3 values, provided that a part of the value from df1$X2 coincides with the value of df2$X2 . This is how df1 should look df1 :
X1 X2 X3 1 12345678 1 2 400454 2 3 12345214 1 4 77753523 9 5 77753827 9 Please tell me how it can be implemented.