-
Notifications
You must be signed in to change notification settings - Fork 29
Feat: Post-processing functions to normalize parameters #451
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
Conversation
|
@billdenney let me know if this matches your idea for the normalization functions |
| if (!col %in% obj_conc_cols) { | ||
| stop("Column ", col, " not found in the PKNCAconc of the PKNCAresults object") | ||
| } | ||
| conc_groups <- dplyr::group_vars(object$data$conc) |
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.
Please make group_vars() work on PKNCAresults objects, and use that. It is likely as simple as
#' @export
group_vars.PKNCAresults <- function(x) {
group_vars(as_PKNCAconc(x))
}
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.
This already exists but I must admit I am actually pro-considering as group_vars for PKNCAresults also start, end and perhaps in the future PPANMETH to differentiate any parameter that may not be calculated in the same way (e.g, different impute)
So in my opinion should be that group_vars(PKNCAconc) != group_vars(PKNCAresults)
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.
That makes sense (see the new issue). Can you please switch this to dplyr::group_vars(as_PKNCAconc(object)), then?
|
I'm going to move this on through without the minor style change I requested. Thanks for the work @Gero1999 ! |
Closes #445
Changes involve:
Added functions to normalize PK parameters based on a column in PKNCAconc (
normalize_by_col) or using custom normalization tables (normalize).Tests added to validate the behavior of normalization functions, including handling of missing groups, duplicate groups, and mismatched lengths
New vignette entry in post-processing to explain how to use these functions