When I work on this package, I found the following bug.
As illustrated in the example, if I ran the following code, I obtained the "forecast_quantile" object.
example_quantile %>%
set_forecast_unit(c("location", "target_end_date", "target_type", "horizon", "model")) %>%
as_forecast() %>%
class()
#> 'forecast_quantile''data.table''data.frame'
However, if I check class after passing through the add_coverage function, the object suddenly becomes a data.table.
example_quantile %>%
set_forecast_unit(c("location", "target_end_date", "target_type", "horizon", "model")) %>%
as_forecast() %>%
add_coverage() %>%
class()
#> 'data.table''data.frame'
Expected outcome would be 'forecast_quantile''data.table''data.frame'.
When I work on this package, I found the following bug.
As illustrated in the example, if I ran the following code, I obtained the "forecast_quantile" object.
However, if I check class after passing through the
add_coveragefunction, the object suddenly becomes a data.table.Expected outcome would be
'forecast_quantile''data.table''data.frame'.