cmu-delphi / epipredict

Tools for building predictive models in epidemiology.
https://cmu-delphi.github.io/epipredict/
Other
8 stars 8 forks source link

`epi_recipe` should only accept `epi_df` and error otherwise #348

Closed dshemetov closed 1 week ago

dshemetov commented 1 week ago

Just had Ryan N run into the uninformative error "should be a data.frame, matrix, etc." when giving an epi_recipe and epi_archive, so he just fed in a tibble and then epi_recipe just silently returned a recipe object, which cryptically rejected any attempt to add an epi_lag. We should be explicit about expecting an epi_df here and error otherwise. In the future, we can add epi_archive support.