Skip to content

Add harm bound to AHR designs#640

Open
LittleBeannie wants to merge 13 commits into
mainfrom
618-add-harm-bound
Open

Add harm bound to AHR designs#640
LittleBeannie wants to merge 13 commits into
mainfrom
618-add-harm-bound

Conversation

@LittleBeannie

@LittleBeannie LittleBeannie commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

To solve issue #618.

@LittleBeannie LittleBeannie self-assigned this Jun 10, 2026
@LittleBeannie LittleBeannie linked an issue Jun 10, 2026 that may be closed by this pull request
LittleBeannie and others added 9 commits June 11, 2026 10:31
The helper-support-as_rtf.R is auto-sourced by testit, so the explicit
source() call failed during R CMD check. Also update as_gt and as_rtf
snapshots to reflect the new bound ordering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Run roxygenize to sync Rd files with code (fixes WARNING)
- Remove test-independent-as_rtf.R (the .md snapshot is sufficient)
- Replace all() with bare logical vector in test assertions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…alone

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@yihui

yihui commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Note on snapshot test changes

The .md snapshot diffs look large but are caused by a single behavioral change: as_gt() now sorts bounds by factor level order (Efficacy, Futility, Harm) via arrange(x2, Analysis, Bound), whereas previously it used arrange(x2, Analysis) which preserved the summary() order (Futility before Efficacy, from desc(bound) alphabetical sorting).

This means every analysis section in both test-independent-as_gt.md and test-independent-as_rtf.md has its Efficacy and Futility rows swapped. The actual numeric values are unchanged.

The other visible change in as_gt.md is lrrrrrcrrrrr (first column alignment changed from left to center).

@yihui

yihui commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Correction on the alignment change: the lrrrrrcrrrrr (first column left → center) is not from this PR's code. It's from gt 1.3.0 changing its default LaTeX alignment for the first data column in row-grouped tables. The old snapshot was generated with an older gt version. Since CI also installs gt 1.3.0, the updated snapshot is correct.

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.

Add harm bound

2 participants