Hello everyone,
I am trying to mimic excel vlookup in R. Basically, I have a data frame with columns( order date, Order Qty, Order to Ship days, Shipping Date, Shipping Qty). My order date and shipping date are continuous date variable. I have to fill the column shipping qty on the shipping date, looking up the order qty on that correspoding order date.
OrderDate OrderQty ORder2Ship Days Shipping Date shipping qty
2021-02-16 10 2 2021-02-16 0
2021-02-17 12 2 2021-02-17 0
2021-02-18 8 2 2021-02-18 10
2021-02-19 9 2 2021-02-19 12