The canned forecasters expect forecast_date and target_date to be Date objects.
step_epi_ahead() and step_epi_lag() require lag/ahead to be integers.
This generally works OK unless you're doing annual forecasts (probably also monthly). Then these clash (because of leap years or strange numbers of days).
Suggested fix:
lead / lag processing should handle things like "1 day" or "1 year". They should operate using date arithmetic on the level of the epi_df time_type. So if time type is year, ahead = 1 should automatically convert to "1 year".
forecast_date
andtarget_date
to beDate
objects.step_epi_ahead()
andstep_epi_lag()
requirelag/ahead
to be integers.This generally works OK unless you're doing annual forecasts (probably also monthly). Then these clash (because of leap years or strange numbers of days).
Suggested fix:
"1 day"
or"1 year"
. They should operate using date arithmetic on the level of theepi_df
time_type. So if time type is year,ahead = 1
should automatically convert to "1 year".This is possibly related to #290 .
Likely requires importing
{lubridate}
and then downstream licensing issues. See https://github.com/tidyverse/lubridate/issues/968