I am trying to add the value from each row of the column ConversionFactor (from df2) to new column ($value) of df1 when the value of same row of column (NameSize) from df1 and df2 are equals.
See the code:
df1$value[df2$NameSize == df1$NameSize] <- df2$ConversionFactor[df1$NameSize == df2$NameSize]
the two dataframe doesnt have same lenght, I have this warning message:
Warning messages: 1: In data_merged_2018_2019_1$NameSize == final_carbonfactor$NameSize : longer object length is not a multiple of shorter object length 2: In if (data_merged_2018_2019_1$NameSize == final_carbonfactor$NameSize) { : the condition has length > 1 and only the first element will be used