Lightweight Tables via JSON Specs and JavaScript
Overview
A lightweight grammar of tables. Build a table by declaring a JSON spec (titles, spanners, row groups, footnotes, formatting functions, etc.); a tiny vanilla JavaScript runtime builds the HTML table from the spec on page load. Cells can hold inline plots (error bars, dot plots, mini line and bar charts) drawn as SVG in the browser from the numbers alone. Tables can optionally be made interactive (sorting, searching, filtering, pagination, column hiding, expandable row detail, and CSV download) via a separate extension loaded only when requested. No 'sass', no 'V8', no 'htmlwidgets' — just base R and 'xfun' ('htmltools' is used only for the optional Shiny binding and for embedding tables in other HTML output).
- Added
lt_interactive()to make a table interactive in the browser: click-to-sort headers, a search box, per-column filters (plain, or typed dropdown/range/checklist widgets), pagination, column resizing, a column-visibility menu, expandable row detail, and a CSV download of the current view. Everything runs client-side via an extension loaded only for opted-in tables, and sorting and filtering stay within each row group or subtree. - Added
lt_errorbar(),lt_sparkline(), andlt_dotplot()to draw lightweight inline plots (error bars, line/bar sparklines, dot plots) in table cells: only the numbers travel to the client and the SVG is drawn in the browser. - Interactive tables expose a controller
el._ltfor driving filters and row detail from external widgets, plusLT.uihelpers (popover(),checklist(),chip()) and a newLT.render(el, spec)for building such widgets and on-demand tables. - Column selection now accepts predicate formulas referencing the pronoun
.(the column names), e.g.~ endsWith(., "_time"), in all functions that select columns. lt_label()now also accepts a named list or vector mapping column names to labels.- Added
lt_wrap()to set HTML attributes on the.lt-wrapcontainer, a hook for scoping custom CSS or sizing a table. lt_spanner()no longer requires itscolumnsin visual order; they are reordered to match the body before rendering (they must still be contiguous).lt_export()no longer drops alt_css()stylesheet attached by a relative path (thanks, @tgerke, #7).lt_export()no longer spills a cropped PDF onto a second page when the table height is fractional.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK6 OK2026-07-01
Documentation
- Help pages
- 32 (2 internal)includes a package overview page
- Examples that run
- 100%30 run in a plain check (2 of them under a condition)
- Exported functions with examples
- 97%
- Documented parameters
- 98%
- Return-value docs
- 97%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 92%
- Median days to close, 50 most recently updated closed issues
- 2
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
Commit identities over time
5 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/yihui/lt on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
The repository owner accepts GitHub Sponsors
GitHub Pages site last deployed 2026-10-10
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-05-19Seen in the repository: CLAUDE.mdNamed in .Rbuildignore: .claude, CLAUDE.mdPull request it wrote: opened by a project memberCommits: at least 192 crediting it in the message
- GitHub Copilotfirst seen 2026-06-08Pull request: opened by its own account
- Claude Opus 4.687 commits · May to Jul 2026
- Claude Opus 4.79 commits · May to Jun 2026
- Claude Opus 4.84 commits · Jun 2026
Some of these counts are a minimum, because the search stopped before the oldest commits.
Dependencies
Installing lt adds 1 package (1 with compiled code, 224 KB of source tarballs). Heaviest: xfun 224 KB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 0.5Latest2026-10-17 · current release · diff ↗ ··
added 9 exports
js, lt_dependency, lt_dotplot, lt_errorbar, lt_hide, lt_interactive, lt_sparkline, lt_spec, lt_wraplisted once in CRAN's queue
Seen in one reading of CRAN's incoming queue, at 2026-10-17 02:21 UTC, so it stayed less than the time between readings. - 0.42026-09-01 · diff ↗
- 0.32026-08-19 · diff ↗
- 0.2
- 0.12026-06-30
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-06-30
- Total releases
- 5 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 115 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("lt")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.