I have two vectors of dates A and B. I would like for each date of A, obtain the closest date in B which is greater or superior to the date itself.
(the reason is that B is a list of working days and I need my output to be a working day).
How can I do this in a vectorised manner in R ?
+1 to blindJesse for the apply logic, but care needs to be given to the case where no nearest date exists as well as the the coercion to numeric that occurs: