feat: Analyte Comparison slides in PPT/QMD export#1175
Draft
feat: Analyte Comparison slides in PPT/QMD export#1175
Conversation
Add 'Analyte Comparison' as a new subsection under Summary Slides in .build_slide_types(). This makes it available in the slide customisation modal when exporting results. Co-authored-by: Ona <no-reply@ona.com>
Add exploration_meanplot call with facet_by = c('DOSETRT', PARAM)
to produce analyte comparison plots for each dose group. The plot
is stored as 'analyte_comparison' in the group output list.
Co-authored-by: Ona <no-reply@ona.com>
Insert analyte comparison plot slide (faceted by DOSETRT × PARAM) into the group summary section, between the main mean plot and the spaghetti plot. Update has_summary check and slide count accordingly. Co-authored-by: Ona <no-reply@ona.com>
Insert analyte comparison plot slide into the QMD summary section, between the mean plot and the spaghetti plot. Update has_summary check to include analyte_comparison. Co-authored-by: Ona <no-reply@ona.com>
Test that the analyte_comparison slide is included/excluded based on slide_sections selection, and that it works with NULL slide_sections (backwards compat). Also add analyte_comparison to base_slides fixture in both test files. Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Ona <no-reply@ona.com>
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 #1174
Description
Adds an "Analyte Comparison" slide type under Summary Slides in the export customisation modal. When selected, it generates mean concentration-time plots faceted by
DOSETRT × PARAM, allowing side-by-side comparison of analytes within each treatment group.Changes:
inst/shiny/modules/tab_nca/zip.R— Addedanalyte_comparisonsubsection to.build_slide_types()under Summary Slidesinst/shiny/functions/zip-utils.R— Addedexploration_meanplot()call withfacet_by = c("DOSETRT", analyte_col)inget_dose_esc_results(), stored asanalyte_comparisonin each group's outputR/officer-utils.R— Renders the analyte comparison plot slide in PPTX between the main mean plot and spaghetti plot; updateshas_summarycheck and slide countR/quarto-utils.R— Renders the analyte comparison plot slide in QMD between the mean plot and spaghetti plot; updateshas_summarychecktests/testthat/test-officer-utils.R— 4 new tests for PPTX analyte comparison inclusion/exclusiontests/testthat/test-quarto-utils.R— 4 new tests for QMD analyte comparison inclusion/exclusionDefinition of Done
.build_slide_types()inzip.Rget_dose_esc_results()inzip-utils.Rofficer-utils.R)quarto-utils.R)How to test
Contributor checklist
.scsschange was done, rundata-raw/compile_css.RNotes to reviewer
No new dependencies added. The analyte comparison plot reuses the existing
exploration_meanplot()function with different faceting parameters. R is not available in the dev container so lintr/tests could not be run locally — CI will validate.