[x] Make sure this PR is against "dev", not "main".
[x] Request a review from one of the current epipredict main reviewers:
dajmcdon.
[x] Makes sure to bump the version number in DESCRIPTION and NEWS.md.
Always increment the patch version number (the third number), unless you are
making a release PR from dev to main, in which case increment the minor
version number (the second number).
[x] Describe changes made in NEWS.md, making sure breaking changes
(backwards-incompatible changes to the documented interface) are noted.
Collect the changes under the next release number (e.g. if you are on
0.7.2, then write your changes under the 0.8 heading).
Change explanations for reviewer
This should allow for weekly and annual forecasts.
Ahead/lag always operate on the time_type of the epi_df. But forecast_date / target_date always were dates. These can clash in non-daily forecast tasks.
We now validate these against the time_type of the epi_df. This should now work naturally. There's a test case for annual forecasts in the panel-data vignette in #115 .
While here, there were a few minor things I fixed:
prefix head and tail with utils:: to avoid R CMD Check notes.
switch a few rlang::abort() to cli::cli_abort()
layer_population_scaling() was producing messages because the by argument could be empty
Note the tolower() processing that is commented out
lag/ahead are coerced to integer silently
In some tests, prep() needed to have the training data.
Magic GitHub syntax to mark associated Issue(s) as resolved when this is merged into the default branch
Checklist
Please:
DESCRIPTION
andNEWS.md
. Always increment the patch version number (the third number), unless you are making a release PR from dev to main, in which case increment the minor version number (the second number).Change explanations for reviewer
This should allow for weekly and annual forecasts.
panel-data
vignette in #115 .head
andtail
withutils::
to avoid R CMD Check notes.rlang::abort()
tocli::cli_abort()
layer_population_scaling()
was producing messages because theby
argument could be emptytolower()
processing that is commented outlag
/ahead
are coerced to integer silentlyprep()
needed to have the training data.Magic GitHub syntax to mark associated Issue(s) as resolved when this is merged into the default branch