Repository navigation
docs: use explicit clinical reporting rounding - #297
Merged
Merged
Conversation
vignettes/clinical-reporting-rounding.R was referenced by bare relative path from both tests (source via test_path) and vignettes (knitr::read_chunk). Those paths break wherever the working directory is not vignettes/: R CMD check and covr run tests from copied trees, and pkgdown builds articles from a temp dir. Move the helpers to R/utils-rounding.R as @nord internals, drop the source() block from the test, and call r2rtf:::format_fixed_ties_away() from the four vignettes.
elong0527
commented
Sep 11, 2026
elong0527
left a comment
Collaborator
Author
There was a problem hiding this comment.
Merge-readiness review of head 6392103 (docs: explicit clinical-reporting rounding; helper as @nord internals in R/utils-rounding.R).
Passes applied (repo-guideline compliance two-pass per CLAUDE.md conventions, bugs introduced by the diff, history/blame context):
- Guideline compliance: new internal helper correctly placed in R/ with @nord (no NAMESPACE/man churn), test file follows test-independent-testing-*.R convention, vignettes keep stats unrounded until display boundary. No exports, DESCRIPTION, or snapshot changes needed for a docs-scoped change.
- Bugs introduced: none retained at >=80% confidence. Verified rounding behavior directly: ties-away (1.25->1.3, -1.25->-1.3, 2.5->3), binary-tie tolerance (1.005->1.01, 2.675->2.68), fixed width without -0.00, digits validation errors. New test file passes 6/6 expectations. Vignette type change (pct numeric->formatted character at display boundary) is intended; no downstream numeric ops on those columns.
- History/blame: prior vignette code used round()/formatC() (banker/binary-representation behavior); the diff replaces display formatting only, analysis stays unrounded. No pre-existing R/ defect masked or reintroduced.
CI state (noted, not decisive): mergeable=true, mergeState=BLOCKED (checks in progress: pkgdown, ubuntu devel/oldrel-1); completed checks green (macOS/Windows/ubuntu-release, style, coverage). Judged on diff merits.
Verdict: ready-to-merge YES. Blockers: none. Findings: 0.
ruchitpatel2002
approved these changes
Sep 22, 2026
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.
Summary
Closes #296
Validation
testthat::test_local(".")(passed; six existing platform-dependent tests skipped)example-basechar.Rmd,example-efficacy.Rmd,example-ae-summary.Rmd, andrtf-row.Rmdin a temporary directorygit diff --check origin/master...HEAD