-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function arguments #65
Comments
Wonder if there's any functionality from {epidemics} that might be useful here in wrapping up parameters to pass to model (maybe just for alignment in styles, rather than taking on as dependency)? |
for consistency with general R language conventions, should probably be: res <- scenario_sim(
n = 10, # n is the stand name for number of samples
parms = ringbp::parameters(), # the deSolve mispelling is widely used for inexplicable reasons
control = ringbp::control_opts() # gives defaults when empty
) ... then all the documentation for pars, control options is migrated to / wrapped up in the |
also, could embrace the res <- rbp_simulate(n = 10, parms = rbp_parameters(), control = rbp_control()) |
That makes sense. Regardless of design choice, would also be useful to have ability to pass distributions like incubation period and estimates of k etc. from {epiparameter} (and {epireview} once we finalise planned interoperability) into both {epichains} and {ringbp}. |
I imagine that rbp_parameters <- function() {
rprocessX = ...,
rprocessY = ...,
etc
} ... where Assuming that's what those other packages yield, then sure. (also, the |
I'm not a fan of the |
shrug; I have mixed feelings. In the case of ringbp, I think the package name itself is sufficient to get my prioritized benefit (tab completion to find functions). (some packages have annoyingly long names, but 6 chars is trim enough imo). I don't like the longer / clunkier prefix_names, but they do largely deal with namespace collisions, which is other main argument for them (and is not an insignificant one for less savvy coders, but not generally a problem for me). |
n.b. what I've proposed above would likely close #29 as well (assuming sensible naming conventions). |
At the moment model parameters sit side-by-side as function arguments with simulation control arguments (i.e. how many simulations, when to stop etc.). If functionality is added to the model in the future, this will lead to an ever-expanding number of arguments, at the expense of usability. It might be good to think about an alternative interface where, e.g. model parameters are passed through function calls or as lists or via some other mechanism.
The text was updated successfully, but these errors were encountered: