-
Notifications
You must be signed in to change notification settings - Fork 13
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
helper functions for working with PKPDsim models #99
Conversation
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.
lgtm, 1 consideration and 1 comment.
|
||
#' Get AUC compartment | ||
#' @rdname get_model_info | ||
#' @returns get_model_auc_compartment: returns the index of the final |
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.
yeah, at some point we should fix that and make a dedicated auc
option or so. We shouldn't rely on this assumption. Fine for now.
#' @returns get_model_structure: returns a single string indicating model | ||
#' structure. E.g.,: "1cmt_iv", "2cmt_oral". | ||
#' @export | ||
get_model_structure <- function(model) attr(model, "misc")[["model_type"]] |
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.
should we keep same naming as the original attribute, i.e. get_model_type
?
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.
i considered it but it seemed so generic. i thought "structure" was clearer, since "linearity" could also be considered a type.
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.
lgtm
A lot of information about a model is hidden within its attributes, which are cumbersome to access via
attr
orattributes
.By wrapping
attr
calls for typical fields we access into functions, this information is made more accessible and better documented.