I have a very basic question, but I dont really know how this can happen:
I have two tibbles/data.frames called "data1" and "data2". Now, I would like to keep "data1" and add all values in "data2" where the columns "variable1" and "variable2" (which appear in both tibbles) are identical. Therefore I do a left_join:
library(dplyr)
newData <- left_join(data1, data2, by=c("variable1", "variable"))
However, If I check the number of rows, nrow(data1) is smaller than nrow(newData). How can this be or why does this happen? Why does the number of cases increase?