I have two databases, one with several observations such as df1 = (size, weight, year) and one with just df2= (year, price). I need to add the price for that year to every observation in df1.
Ive tried merge which wont let me because df2 is much smaller and I need to repeat the values. I've tried right_join which throws the
Error in UseMethod("right_join") : no applicable method for 'right_join' applied to an object of class c('double','numeric')"
When I've tried df3 <- left_join(df1, df2, by= "year" ) the result is:
Error in UseMethod("left_join") : no applicable method for 'left_join' applied to an object of class c('double', numeric')"