generated from epiverse-trace/packagetemplate
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Design of helper functions #5
Labels
discussion
For package design discussions
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue is intended as a design discussion for helper functions in
{scenarios}
.These functions are intended to be used within
comparisons
objects, but could also be made available to users for more ad hoc use.are_comparable()
: Function that takes two or morescenario
class objects as input and checks which pair-wise comparisons are possible. This depends on whether the same function was called, and whether the parameter list has the same elements (throw warnings if the parameter list is identical).scenarios
(e.g. if comparing different R0 in the same population, do not allow comparison where demography is different; such as when demographic groups have different age limits). Could be used for only two objects, in which case it should return a single boolean; otherwise, a boolean matrix of whether any pair of scenarios are comparable.select_comparable()
: Function that takes two or morescenario
class objects as input, as well as an optional string or integer specifying which should be considered the ‘baseline’ object. Runsare_comparable()
and returns only those scenarios which are comparable as a list; the ‘baseline’ object is returned as the first element of the list. If no ‘baseline’ is specified, the first object is assumed to be the baseline with a warning or message to the user.make_scenario_names()
: Function to make informative names forscenario
objects, based on their parameter combinations, and/or other user-specified name components.read_scenario()
/write_scenario()
: Functions to read in and save a scenario specification from or to a file (structured Excel, JSON, YAML).The text was updated successfully, but these errors were encountered: