For example, if we have max_lag = 14, then we would do something like:
x_latest <- x %>%
filter(!is.na(case_rate), !is.na(death_rate)) %>%
group_by(geo_value) %>%
slice_tail(n = 15) # have lag 0,...,14, so need 15 for a complete case
The function should read the epi_recipe, perhaps after prep() or bake().