Repository navigation
Conversation
Render AE summary and specific tables with the lightweight `lt`
package instead of `gt`, dropping ~54 recursive dependencies.
- `gt_ae_summary()` / `gt_ae_specific()` keep their exported names and
signatures but now return an `lt_tbl` (previously a `gt_tbl`).
- Map the gt grammar to lt: `gt()`->`lt()`, `tab_spanner()`->`lt_spanner()`,
`cols_label()`->`lt_label()`, `tab_header()`->`lt_header()`,
`sub_missing()`->`lt_sub()`, `fmt_markdown()`+raw HTML name column via
`lt_html()`, `tab_style(weight=bold)`->`lt_style(bold=)`,
`tab_style(indent)`->`lt_indent()`, and `tab_source_note()`->`lt_note()`.
- Factor the duplicated `{^...}` superscript helper into a single
internal `convert_caret_sup()` in utility.R.
- Swap `gt` for `lt` in DESCRIPTION Imports and add `Remotes: yihui/lt`
(lt is not on CRAN).
- Update the developer tests to assert the `lt_tbl` class and check the
rendered HTML via `format()`.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
This branch has not been deployed
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
Render AE summary and specific tables with the lightweight
ltpackage instead ofgt, dropping ~54 recursive dependencies (ltdepends only onxfun).Changes
gt_ae_summary()andgt_ae_specific()keep their exported names and signatures but now return anlt_tbl(previously agt_tbl). This return-contract change is unavoidable when swapping the rendering backend.gt()->lt()(withauto_format = FALSEto preserve the pre-formatted cell strings)tab_spanner()->lt_spanner()cols_label()->lt_label()tab_header(title = md(...))->lt_header(title = I(...))(lines joined with<br>)sub_missing(missing_text = "")->lt_sub(missing = "")fmt_markdown()on the name column ->lt_html()to render the generated<sup>tags as raw HTMLtab_style(cell_text(weight = "bold"))->lt_style(bold = TRUE)tab_style(cell_text(indent = px(10)))->lt_indent()tab_source_note()->lt_note()(one note per footnote/source line){^...}-><sup>helper out of both files into a single internalconvert_caret_sup()inR/utility.R.gtfrom Imports, addedlt, and addedRemotes: yihui/lt(lt is not on CRAN; no version pin).lt_tblclass and check the rendered HTML viaformat().Decisions / notes
gt_ae_summary()/gt_ae_specific(), and the files stayR/gt_ae_*.R. Minimal churn.ltS3 method or generic re-export is needed: these functions calllt::lt()directly on a data frame.lttables and render fine vialt'sknit_printmethod.Verification
devtools::load_all()+ the two affected test files pass:🤖 Generated with Claude Code