Skip to content

docs: use explicit clinical reporting rounding - #297

Merged
ruchitpatel2002 merged 2 commits into
masterfrom
codex/issue-296
Sep 22, 2026
Merged

ruchitpatel2002 merged 2 commits into
masterfrom
codex/issue-296

Conversation

@elong0527

Copy link
Copy Markdown
Collaborator

Summary

  • add a shared vignette helper that rounds clinical display values ties-away-from-zero before fixed-point formatting
  • use the helper at the reporting boundaries in the baseline, efficacy, adverse-event, and row-formatting examples
  • add regression coverage for exact ties, binary decimal ties, fixed-width values, and negative zero

Closes #296

Validation

  • testthat::test_local(".") (passed; six existing platform-dependent tests skipped)
  • rendered example-basechar.Rmd, example-efficacy.Rmd, example-ae-summary.Rmd, and rtf-row.Rmd in a temporary directory
  • git diff --check origin/master...HEAD

elong0527 and others added 2 commits September 10, 2026 22:45
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
elong0527 requested a balanced review from Copilot September 11, 2026 02:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@elong0527 elong0527 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
ruchitpatel2002 merged commit d24267f into master Sep 22, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clinical-reporting vignettes should use an explicit rounding policy

3 participants