Fix: use dose-relative times for manual interval parameter renaming#1169
Open
Fix: use dose-relative times for manual interval parameter renaming#1169
Conversation
Reverts to signif(start_dose)/signif(end_dose) to match the convention in pivot_wider_pknca_results. Using start/end produced absolute times instead of dose-relative times, causing PPTESTCD mismatch. Fixes #1168 Co-authored-by: Ona <no-reply@ona.com>
Aligns parameter selector choices with pivot_wider_pknca_results convention. Co-authored-by: Ona <no-reply@ona.com>
Aligns .prepare_boxplot_data (or inline mutate) with pivot_wider_pknca_results convention. Co-authored-by: Ona <no-reply@ona.com>
The parameter selector uses cleaned names (e.g. CMAX) but the summary_stats columns include units (e.g. CMAX[ng/mL]). The select was silently dropping all parameter columns via any_of(). Now maps clean names back to actual column names before selecting. Co-authored-by: Ona <no-reply@ona.com>
results_to_join selected group/classification columns from conc data but did not deduplicate. Since conc data has one row per timepoint per subject, the inner_join duplicated each result row for every timepoint, inflating the statistics (identical min/max/median within groups). Co-authored-by: Ona <no-reply@ona.com>
15 tasks
Collaborator
|
type_interval == "manual" ~ paste0(
PPTESTCD, "_", start, "-", end,
ifelse(PPSTRESU != "", paste0("[", PPSTRESU, "]"), "")
)This is the same inconsistency this PR fixes in the other three files. The column labels generated here would use absolute times while the column names (from Suggested fix: type_interval == "manual" ~ paste0(
PPTESTCD, "_", signif(start_dose), "-", signif(end_dose),
ifelse(PPSTRESU != "", paste0("[", PPSTRESU, "]"), "")
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Closes #1168
Description
Two bugs in the descriptive statistics module:
1. Parameter columns not displayed in the table. The parameter selector was refactored from
updatePickerInput(raw column names likeCMAX[ng/mL]) toselector_label(cleaned names likeCMAX). Butsummary_stats_filteredstill usedselect(any_of(input$select_display_parameters))— the clean names didn't match the actual column names with units, soany_of()silently dropped all parameter columns.2. Interval parameter renaming mismatch. Commit
742ca2434changedsignif(start_dose)/signif(end_dose)tostart/endindescriptive_statistics.R. This produced absolute interval times instead of dose-relative times, mismatchingpivot_wider_pknca_resultswhich usessignif(start_dose)/signif(end_dose). The same incorrect convention was propagated toparameter_plots.Randflexible_violinboxplot.R.Changes
descriptive_statistics.R— map clean parameter names back to actual column names (with units) before selecting; revert interval renaming tosignif(start_dose)/signif(end_dose)parameter_plots.R— align interval renaming withpivot_wider_pknca_resultsflexible_violinboxplot.R— align interval renaming withpivot_wider_pknca_resultsHow to test
AUCINT_0-12)Contributor checklist