I have a dataset and I'm trying to find the closet date to '2021-08-02' without going before it. So, in my sample dataset below, I want it to filter out everything before '2021-08-05' since that is the nearest date without going sooner.
library(dplyr)
test <- tibble(Day = seq(as.Date("2021-08-01"), as.Date("2021-09-10"), by="4 days"),
Score = c(sample(1:15, 11)))