I have 2 data frames in R
DF1
is
ColA ColB observation
123 Text1 45
234 Text2 65
345 Text3 78
DF2
is
ColumnA ColumnB metric
123 Text1 7
123 Text2 65
345 Text1 102
I want to replace the observation
column of DF1
with values of the metric
column of DF2
but only for the rows that have an exact match on ColA
=ColumnA
and ColB
=ColumnB
. The above example shall output the following data frame:
ColA ColB value
123 Text1 7
234 Text2 65
345 Text3 78