Skip to content

Drop the glue dependency in favor of base R - #265

Merged
LittleBeannie merged 3 commits into
mainfrom
drop-glue-dependency
Nov 6, 2026
Merged

LittleBeannie merged 3 commits into
mainfrom
drop-glue-dependency

Conversation

@yihui

@yihui yihui commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Removes the glue import, replacing its four glue::glue_data() call sites with equivalent base R. No behavior change; the affected tests pass.

Site Replacement
R/gt_ae_specific.R footnotes gsub("{meddra_version}", ...)
R/tlf_ae_specific.R footnotes gsub("{meddra_version}", ...)
R/tlf_ae_specific_subgroup.R footnotes gsub("{meddra_version}", ...)
R/prepare_ae_specific.R obs labels sprintf() over the mapping's term1/term2

The footnote templates only ever substitute a single {meddra_version} placeholder, so a fixed gsub() over the footnote vector is exact and vectorized. The observation-section labels evaluate tolower(term1)/tolower(term2), handled by sprintf().

Verification

testthat::test_dir(..., filter="specific") -> 62 pass; filter="gt_ae|subgroup" -> 15 pass. Package loads cleanly.

🤖 Generated with Claude Code

yihui and others added 2 commits October 16, 2026 13:48
Replace the four `glue::glue_data()` call sites with equivalent base R:

- The three footnote templates in `gt_ae_specific()`, `tlf_ae_specific()`,
  and `tlf_ae_specific_subgroup()` only substitute `{meddra_version}`, so a
  fixed `gsub()` over the footnote vector suffices.
- The observation-section labels in `prepare_ae_specific()` use `sprintf()`
  with the parameter mapping's `term1`/`term2`.

Remove `glue` from Imports. Output is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
@yihui
yihui marked this pull request as ready for review November 5, 2026 15:25
@yihui
yihui requested a review from LittleBeannie November 5, 2026 20:47
@LittleBeannie
LittleBeannie merged commit 75d1154 into main Nov 6, 2026
9 checks passed
@LittleBeannie
LittleBeannie deleted the drop-glue-dependency branch November 6, 2026 15:21
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.

2 participants