Skip to content
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

Merged
merged 3 commits into from
Jun 11, 2024
Merged

Conversation

jasmineirx
Copy link
Contributor

A lot of information about a model is hidden within its attributes, which are cumbersome to access via attr or attributes.

By wrapping attr calls for typical fields we access into functions, this information is made more accessible and better documented.

Copy link
Contributor

@roninsightrx roninsightrx left a 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
Copy link
Contributor

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"]]
Copy link
Contributor

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 ?

Copy link
Contributor Author

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.

Copy link
Contributor

@dominic-irx dominic-irx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Base automatically changed from RXR-2112 to master June 11, 2024 16:42
@jasmineirx jasmineirx closed this Jun 11, 2024
@jasmineirx jasmineirx reopened this Jun 11, 2024
@jasmineirx jasmineirx merged commit 0dbf438 into master Jun 11, 2024
2 checks passed
@jasmineirx jasmineirx deleted the RXR-2119 branch June 11, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants