I have two data.frames
like this:
df1:
col1 col2 col3
1 2 20
2 4 30
3 4 25
df2:
colX colY colZ
5 12
1 9
1 2
Now I want to assign values to colZ in df2. This has to be the number in col3 of df1 when the values in col1 equals colX and col2 equals colY
Desired output:
df2:
colX colY colZ
5 12 NA
1 9 NA
1 2 20
I hope that someone can help me