Replace gt dependency with lt#629
Draft
yihui wants to merge 5 commits into
Draft
Conversation
Remove the gt package dependency entirely and use the lightweight lt package for table rendering. This reduces install weight and aligns with the project's move toward minimal dependencies. Changes: - New as_lt() generic + methods replacing as_gt() - All vignettes updated: gt() → lt(), tab_header() → lt_header(), fmt_number() → lt_format(), tab_spanner() → lt_spanner(), tab_footnote() → lt_footnote()/lt_note(), cols_label() → lt_cols_label() - README.Rmd: use knitr::kable() for GitHub rendering - DESCRIPTION: gt removed from Imports, lt added - Tests updated for lt_tbl assertions Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
lt requires character strings for column names (unlike gt's tidy-select). Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
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
gtpackage fromImportsand replace with the lightweightltpackageas_lt()generic + S3 methods forfixed_design_summaryandgs_design_summary, fully replacingas_gt()lt(),lt_header(),lt_spanner(),lt_format(),lt_footnote(),lt_note(),lt_cols_label())knitr::kable()for GitHub rendering and show lt API in code exampleslt_tblassertionsNew lt features required (committed in yihui/lt)
lt_cols_label(): rename column display headers without modifying data frame columnslt_footnote(match = "starts_with"): target all row groups whose label starts with a prefix (used for "Analysis: ..." groups)Migration mapping
gt::gt(x)lt(x)group_by(col) |> gt()lt(x, row_group = "col")tab_header(title, subtitle)lt_header(title, subtitle)tab_spanner(label, columns)lt_spanner(label, columns)fmt_number(columns, decimals)lt_format(columns, decimals)tab_footnote(fn, cells_column_labels(col))lt_footnote(text, "column", columns)tab_footnote(fn)(no location)lt_note(text)cols_label(a = "A")lt_cols_label(a = "A")Test plan
as_lt()unit tests pass for fixed and GS designs🤖 Generated with Claude Code