Repository navigation
Observed upper percentile line not drawn when lower percentile is censored (NA) - #125
Merged
roninsightrx merged 1 commit intoNov 12, 2026
Conversation
… them (#122) The observed lower and upper percentiles were drawn as the outline of a single geom_ribbon(ymin = obs5, ymax = obs95). When one of them was NA (censored by lloq/uloq) ggplot2 dropped the whole row, hiding the other, valid percentile in that bin. Draw them as two geom_line() layers instead, with na.rm = TRUE so interior NAs become gaps without a warning. Updated vdiffr snapshots (same visuals, plus the upper line now extends into the last bin of the lloq/log_y plot) and added a regression test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
roninsightrx
commented
Nov 12, 2026
roninsightrx
left a comment
Collaborator
Author
There was a problem hiding this comment.
🤖 Codex review, round 1: ✅ approved
The plotting change correctly separates the percentile lines and handles both LLOQ and ULOQ cases. The full suite passed (438 tests); only the test dependency-version mismatch remains.
| Severity | Location | Finding |
|---|---|---|
| minor | tests/testthat/test-vpc.R:88 |
The new test uses expect_no_warning(), introduced in testthat 3.1.5, while DESCRIPTION still declares testthat (>= 3.0.0). Running tests with the stated minimum will fail because the function is unavailable. Either raise the minimum testthat version or use an assertion supported by 3.0.0. |
roninsightrx
marked this pull request as ready for review
November 12, 2026 21:09
roninsightrx
deleted the
nightshift/122-observed-upper-percentile-line-not-drawn
branch
November 12, 2026 21:10
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.
Closes #122
geom_obs_ci_continuous() now draws observed lower/upper percentiles as two separate geom_line() layers (na.rm = TRUE) instead of a ribbon outline, so a censored NA in one percentile no longer hides the other. Added regression test, updated vdiffr snapshots, bumped to 1.3.4 with NEWS entry.
🤖 Implemented by Claude Code and reviewed by Codex, orchestrated by nightshift. Review rounds are posted as comments below.