Hi there,
I have a doubt in how merge the dataframe a with b apply a margin of +-1 to to merge by Price and Price.1
a<- data.frame(id.1 = c(1), Price = c(1200))
b<- data.frame(idc.1 = c(1,2,3,4), Price.1 = c(1201,1202,1200,1199))
result <- data.frame(id.1 = c(1,1,1),
idc.1 = c(1,3,4),
Price = c(1200,1200,1200),
Price.1= c(1201,1200,1199))
Can you please help on that?
Thanks