Replace gt with lt for table output - #282
Open
yihui wants to merge 11 commits into
Open
Conversation
Replace the gt package dependency with the lightweight lt package for all table output, mirroring Merck/gsDesign2#629. - Add lt.gsBinomialExactTable() S3 method (R/as_lt.R) and deprecate as_gt() in favor of lt::lt(). - Swap gt for lt in DESCRIPTION Imports; add Remotes: yihui/lt pending the next lt release on CRAN. - Migrate all table-bearing vignettes to lt, dropping the bundled html_vignette CSS in favor of a minimal vignettes/vignette.css. - Update tests, docs, and _pkgdown.yml accordingly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
yihui
force-pushed
the
replace-gt-with-lt
branch
from
July 10, 2026 20:45
39aa27c to
7f9a4e8
Compare
This was referenced Aug 3, 2026
yihui
marked this pull request as ready for review
August 20, 2026 01:30
Keep as_gt() returning a gt_tbl for one release so existing code that customizes the output with gt functions keeps working. The generic now emits a deprecation warning pointing to lt::lt(), then dispatches to the restored gt-based method, which guards on gt being installed (gt moved to Suggests). Also re-export the lt() generic so lt() can be called on a summary table after loading only gsDesign, with robust S3 dispatch regardless of package load order. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jdblischak
reviewed
Aug 26, 2026
jdblischak
left a comment
Collaborator
There was a problem hiding this comment.
Need to remove unnecessary lt:: now that the generic is re-exported. I highlighted most of them. And no need to accept my individual suggestions if you'd prefer to do the update in a single commit.
Co-authored-by: John Blischak <jdblischak@gmail.com>
yihui
commented
Aug 26, 2026
Co-authored-by: Yihui Xie <xie@yihui.name>
jdblischak
reviewed
Aug 26, 2026
Co-authored-by: John Blischak <jdblischak@gmail.com>
jdblischak
approved these changes
Aug 26, 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.
Replace the
gtpackage dependency with the lightweightltpackage for all table output, mirroring Merck/gsDesign2#629.Changes
lt.gsBinomialExactTable()S3 method (R/as_lt.R); deprecateas_gt()in favor oflt::lt().gtforltinDESCRIPTIONImports.lt, dropping the bundledhtml_vignetteCSS in favor of a minimalvignettes/vignette.css._pkgdown.yml.Side-by-side comparison of vignettes rendered via gt vs lt
Download and unzip: vignette-compare.zip