construct_model()'s first two arguments are now pathogen_structure
then method (previously method then pathogen_structure), to match
the logical order in which a model is built: prepare the pathogen
structure, then choose how to model it (#70). Any code calling
construct_model() positionally (e.g. construct_model(my_method, my_pathogen_structure)) will need to swap the order of these two
arguments; calls using named arguments are unaffected.subtyped()'s influenzaA_unsubtyped_timeseries and
influenzaA_subtyped_timeseries arguments are now unsubtyped_timeseries
and subtyped_timeseries. The influenzaA_ prefix implied the structure
only applied to influenza A subtypes, when it applies to any pathogen with
a combined, unsubtyped timeseries alongside partial subtype data —
influenza A is just the most common example (#73). Any code calling
subtyped() with these named arguments will need to update the argument
names.plot.incidence() hardcoding "Modelled influenza cases" as its
y-axis label regardless of the pathogen(s) actually being modelled; it
now reads the disease-agnostic "Modelled cases".dow_effect = TRUE (#42).proportion() / plot() example in the vignette and fixed
the underlying figure path so plots render correctly (#45).Rt() equation failing to render on the pkgdown site by setting
MathJax as the math renderer (#44).construct_model() and compute_multi_pathogen() erroring on R
versions before 4.4.0 with "could not find function '%||%'", by
explicitly importing %||% from rlang instead of relying on base R's
version, which only exists from R 4.4.0 (related to #43).rstan's own precompiled Windows binary DLL failed to load
("LoadLibrary failure"), most likely an ABI mismatch between the
RSPM binary and the runner's Rtools version. Fixed by reinstalling
rstan from source on the Windows CI job specifically.StanHeaders:::LdFlags() unconditionally
links against a dynamic tbb/tbbmalloc, which RcppParallel
(from version 6.0.0) no longer reliably provides on Windows (having
moved to static TBB linking), and -Wl,-rpath has no effect on
Windows regardless. Fixed by dropping StanHeaders:::LdFlags() from
src/Makevars.win's PKG_LIBS and relying solely on
RcppParallel::RcppParallelLibs(), matching what rstan's own
Windows build does.
Also lowered optimisation from -O2 to -O1, suppressed compiler
warnings, and enlarged the Windows runner's pagefile in
src/Makevars.win/CI config; these weren't the actual fix for either
issue above, but remain in place as they reduce build time/noise and
are otherwise harmless.proportion() now returns the resolved pathogen names used as its
numerator and denominator ($numerator_combination /
$denominator_combination), and plot.proportion() adds a subtitle
reporting the denominator when it isn't the default (all pathogens),
since the denominator otherwise has no representation anywhere on the
plot (#69).plot() methods at end = 0.9 so the
palest yellow no longer makes lines hard to distinguish (#71).ggplot2 functions explicitly rather than importing
the whole package (#35).Config/testthat/parallel: true (#39).print() method for EpiStrainDynamics.model objects (#47).cli::cli_abort() (#49).plot() is no longer redefined as a generic (#48), and its S3 methods'
first argument was renamed from df to x to match the base generic's
signature, resolving an R CMD check S3 generic/method consistency
warning.styler, dropped explicit return() on final statements,
converted sapply() to vapply() for type-safe extraction, and removed
genuine dead code flagged by unused-variable checks.\dontrun{} in examples with @examplesIf interactive() for slow
examples and guards such as @examplesIf rlang::is_installed("xts") where a
package is used only in an example (#36).Rt(), including its gi_dist argument (#44).smoothing_structure() and diagnose_model()
(#53, #54).growth_rate(), incidence(), and
proportion() to match the level of detail in Rt(), including symbol
breakdowns for their adjustment formulas and, for growth_rate(), its
relationship to Rt() (#66).[] cross-links for referenced functions throughout the
documentation (#55).precompile.R for the vignette and included revision
instructions in CONTRIBUTING.md (#46).sarscov2 and influenza datasets (#56).Initial version submitted to rOpenSci for peer review (ropensci/software-review#763).
construct_model() and fit_model(),
with smoothing_structure() and dispersion_structure() helpers.incidence(), growth_rate(), Rt(), and
proportion(), each with a plot() method.diagnose_model() for MCMC convergence diagnostics.influenza and sarscov2 example datasets.