My issues is as follows:
Here are examples of datasets:
data_frameAB <- data.frame(ID=c(1,1,1,1,1,1,1,1,1,15,15,15,45,45), Ye