Variable passing
The model parameters are defined multiple times across the package. It would be good to have a single reference in the documentation and use @inheritParams elsewhere, and to pass variables via ... where appropriate rather than redefining which will make future extensions difficult.
n.b., switching to a ringbp::parameters() approach (per #65) might also deal with this handily.
I've addressed the comment on inheriting documentation in ff399d1ccc2566196fa70d97763e863e93a4fa67.
Currently, ... is not used by any function, so I was a bit confused by:
to pass variables via
...where appropriate rather than redefining which will make future extensions difficult
Let me know if you'd like any particular changes with respect to this comment.
Currently, ... is not used by any function, so I was a bit confused by:
What I meant was the opposite, outbreak_model could be defined as (side comment we should have consistent naming in snake_case) as
outbreak_model <- function(num.initial.cases, ...)
and later call
outbreak_step(...)
That said I think the approach suggested by @pearsonca in https://github.com/epiforecasts/ringbp/issues/58#issuecomment-1831738769 is safer/preferable (also because we pass the parameters to two other functions).
@sbfnk this can be closed now #78 is merged.