I have Two data frames DF1 and DF2, I need to compare the Days from DF1 with respect to LOW Range and HI Range columns from DF2 and get the Days Range column in the resulting data frame.
Items=c("Vegetables","Fruits","Grocery","Dairy Product")
Days=c(16,5,41,25)
DF1=data.frame(Items,Days)
Low_Range=c(0,8,15,22,31,61)
Hi_Range=c(7,14,21,30,60,90)
Days_Range=c("within 7 days","8 to 14 days","15 to 21 days","22 to 30 days","31 to 60 days","61 to 90 days")
DF2=data.frame(Low_Range,Hi_Range,Days_Range)
Days_Slot=c("15 to 21 days","within 7 days","31 to 60 days","22 to 30 days")
DF_Result=data.frame(Items,Days,Days_Slot)
DF_Result will be my Resulting data frame with Days_Slot as new column added to DF1. Can anyone Help to solve this