-
Notifications
You must be signed in to change notification settings - Fork 11
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
Update epidist_db()
to give more fine-grained control
#160
Conversation
Thanks - just flagging that the new implementation would lead to this code epidist_db(
disease = "COVID-19",
epi_dist = "onset_to_death",
author = "Linton_etal"
) returning multiple |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me - discussion continues on Slack so I'd be happy to take another look once the PR stabilises.
…ize, and improved printing, WIP #163
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making these changes @joshwlambert - looks okay to me other than some minor points flagged here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks for making the changes. Just the one issue of unused eparam
in test-checkers.R
, but otherwise feel free to merge.
#' | ||
#' @return A boolean logical for <epidist> or vector of boolean for each entry | ||
#' in the <epiparam>. | ||
#' @export |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this function is exported, would it be possible to add in the description or in the examples a typical use case for users? At the moment, I can only think about internal use cases.
This PR addresses #163 (and #91 which was superseded by #163).
The new implementation uses
subset
argument to allow the use to define subsetting criteria to select the entry from the database they want. It also includes asingle_epidist
argument to allow uses to specify if they only want a single<epidist>
returned.It also changes
is_parameterised()
to make it an S3 generic which has methods for<epiparam>
and<epidist>
objects.