I´m trying to merge 2 data frames that looks like this.
DF1:
'data.frame': 82 obs. of 4 variables:
$ hemmabutik : int
$ Sales_2016_np : int
$ Sales_2016_mar : int
DF2:
'data.frame': 82 obs. of 4 variables:
$ hemmabutik : int
$ Sales_2016_mar : int
enter code here
DF3 <- merge(x = DF1, y = DF2, by = c("hemmabutik"), all=TRUE)
DF3:
'data.frame': 82 obs. of 4 variables:
$ hemmabutik : int
$ Sales_2016_np : int
$ Sales_2016_mar.x: int
$ Sales_2016_mar.y: int
What I want is this:
DF3:
'data.frame': 82 obs. of 4 variables:
$ hemmabutik : int
$ Sales_2016_np : int
$ Sales_2016_mar: int
And I want that the field values for "Sales_2016_mar" in DF2 should write over the values from DF1.
Anyone have a solution to this problem?