gt
‹1.4.0
- 1.4.015 Oct 2026, current
- 1.3.022 Jan 2026
- 1.2.016 Dec 2025
- 1.1.024 Sep 2025
- 1.0.05 Apr 2025
- 0.11.14 Oct 2024
- 0.11.010 Jul 2024
- 0.10.118 Jan 2024
- 0.10.07 Oct 2023
- 0.9.031 Mar 2023
- 0.8.017 Nov 2022
- 0.7.025 Aug 2022
- 0.6.024 May 2022
- 0.5.022 Apr 2022
- 0.4.015 Feb 2022
- 0.3.17 Aug 2021
- 0.3.012 May 2021
- 0.2.26 Aug 2020
- 0.2.123 May 2020
- 0.2.0.531 Mar 2020
Easily Create Presentation-Ready Display Tables
- CRAN checks, method
Method
Checks and health
CRAN runs every current package through
R CMD checkon a set of machines and publishes a result for each one. The health shown on a package page comes from these results alone.- Problems
- Notes alone never count against a package, but a warning, an error or a failure on any platform is a problem. Open CRAN deadlines are a fact of their own, shown as a clock after the mark, so the mark always says what the checks found.
- Checks only
- Health reflects CRAN's check results and nothing else. Even a package with no tests, no coverage or no recent release can have every platform OK.
- Once a day
- Results are collected once a day from files CRAN publishes. Each platform is one machine set-up, named by its R version, operating system, architecture and compiler, such as r-devel-linux-x86_64-fedora-clang.
- Platforms counted
- The 13 in 3 of 13 is the number of platform rows CRAN published for that package on the day of collection. The set of machines changes over time, so the number is not fixed, and a package missing from a platform counts as neither passing nor failing there.
- All OK13 platforms
- CRAN 30-day downloads, method
- 124K+6.3% up on the 30 days before, the better direction
- Dependent packages, method
Method
Reverse dependencies
Dependent packages are other packages that list this one under
Depends,ImportsorLinkingToin theirDESCRIPTIONfile. Those fields list the packages a package needs to install, so dependents break if this one is archived or broken.- As declared
- The counts follow the declarations as written, not whether a package uses the other one when it runs.
- Suggests apart
- Packages that list this one only under
Suggestsinstall and run without it, and use it for tests, examples or an optional feature. They are counted as Suggested by, never among the dependents, and a package that also lists it under one of the three fields is a dependent and is not counted again. - Zero
- Zero dependents means no current CRAN package declares a need for this one, though some may suggest it. On 28 Oct 2026, 19,572 of the 25,581 current CRAN packages had no dependent package.
- 90160 more suggest it
- Test coverage, method
Method
Test coverage
Test coverage is measured by downloading each CRAN package's current source file, installing its dependencies, building it and running its tests under covr.
- Almost half of CRAN has no tests to run
- Only CRAN packages are measured. Many have no percentage, most often because the package has no tests, and that blank is a recorded outcome, not missing data.
- NOT_CRAN
- Tests run with NOT_CRAN=true, so tests that skip themselves on CRAN run here, and the figure can differ from what CRAN's own checks see.
- Current version only
- Only the current version is measured, and a new version on CRAN is measured again. Older rows are kept but never filled in later. This is one package's run.
- Never 0%
- On a package page three states stay apart: measured, no tests, and not measured. Neither of the last two is ever shown as 0%.
- 27%of lines run by tests
- Advisories, method
Method
Security advisories
Advisories come from the R Consortium advisory database, a community record of security problems in R packages, as OSV publishes it.
- The copy
- The record is read once a day. The data is published under the Apache License 2.0 and is credited on the advisories list.
- Box under the name
- Under the package's name, a box names any advisory that affects the current release, with its fix or that there is none.
- Ranges
- Advisories state ranges, such as from 0.9.12 up to but not including 1.8.8. Each range is checked against every version CRAN has published, using the version rules R itself uses, so a release that came out after the advisory was written is still caught by its range.
- Not the package
- The rating is for the library flaw itself, not for how exposed the R package is, and it is never added up into a figure for the package.
- None known
About
Method, About Method Licence figures come from the Licences
License field of each package's DESCRIPTION file, read the way R itself reads it. No licence file is opened.tools::analyze_license() and R's own licence database, as CRAN's checks read it.| is read, so one string can offer two families.
Build display tables from tabular data with an easy-to-use set of functions. With its progressive approach, we can construct display tables with a cohesive set of table parts. Table values can be formatted using any of the included formatting functions.
Full description
Build display tables from tabular data with an easy-to-use set of functions. With its progressive approach, we can construct display tables with a cohesive set of table parts. Table values can be formatted using any of the included formatting functions. Footnotes and cell styles can be precisely added through a location targeting system. The way in which 'gt' handles things for you means that you don't often have to worry about the fine details.
- Maintainer
- Richard Iannone
- Licence
- MIT + file LICENSE
- Latest release
- 15 Oct 2026
- First release
- 31 Mar 2020
More details
- Releases
- 20
- Needs compilation
- No
- Needs R
- >= 4.1.0
- Config/Needs/coverage
- officer
- Config/Needs/website
- quarto
- Config/roxygen2/version
- 8.0.0
- Config/testthat/edition
- 3
- Config/testthat/parallel
- true
- LazyData
- true
- RoxygenNote
- 7.3.3
Task views (1)
Subjects (1) Method, SubjectsMethod
Subjects and collections
Subjects are the site's own grouping of CRAN packages, found by clustering. Collections are sets of packages that communities declare, such as the tidyverse.
- Subjects
- Subjects are found by clustering the words of current CRAN packages and the packages they use. No one edits them by hand.
- Collections
- Collections are sets that communities declare, through a package that installs the set or an organization on GitHub. The site finds them by rules.
- Who made each
- Subjects are marked Site and collections Community. Subjects, collections and task views are never mixed in one list.
- The day of the data
- Subjects and collections were last worked out on 22 Oct 2026.
- Presentation tables, core
Cite
Package
Run in R for the authors' preferred citation:
citation("gt")Iannone, R., Posit Software, PBC, Brevoort, K., Cheng, J., François, R., Haughton, S., Hughes, E., Lauer, A., Roy, O., Schloerke, B., & Seo, J. (2026). gt: Easily Create Presentation-Ready Display Tables (Version 1.4.0) [Computer software]. https://doi.org/10.32614/CRAN.package.gt
About
This package has no citation file, so citation() returns this entry built from DESCRIPTION.
The repository also keeps a CITATION.cff.
R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
Balamuta, J. J. (2026). R Observatory: Metrics for gt version 1.4.0 [Data set]. HJJB, LLC. Data release v2026-10-28. https://doi.org/10.5281/zenodo.21843040
About
From data release v2026-10-28, which the citation names so these numbers can be found later.
Health
All 13 check platforms pass.
r-devel-linux-x86_64-debian-clangThe unreleased R on Linux, x86_64, debian-clang
OK
- Version checked
- 1.4.0
- Time taken
- 348 s
r-devel-linux-x86_64-debian-gccThe unreleased R on Linux, x86_64, debian-gcc
OK
- Version checked
- 1.4.0
- Time taken
- 232 s
r-devel-linux-x86_64-fedora-clangThe unreleased R on Linux, x86_64, fedora-clang
OK
- Version checked
- 1.4.0
- Time taken
- 232 s
r-devel-linux-x86_64-fedora-gccThe unreleased R on Linux, x86_64, fedora-gcc
OK
- Version checked
- 1.4.0
- Time taken
- 209 s
r-devel-windows-x86_64The unreleased R on Windows, x86_64
OK
- Version checked
- 1.4.0
- Time taken
- 344 s
r-oldrel-macos-arm64The previous release of R on macOS, arm64
OK
- Version checked
- 1.4.0
- Time taken
- 73 s
r-oldrel-macos-x86_64The previous release of R on macOS, x86_64
OK
- Version checked
- 1.4.0
- Time taken
- 341 s
r-oldrel-windows-x86_64The previous release of R on Windows, x86_64
OK
- Version checked
- 1.4.0
- Time taken
- 438 s
r-patched-linux-x86_64The patched release of R on Linux, x86_64
OK
- Version checked
- 1.4.0
- Time taken
- 365 s
r-release-linux-x86_64The current release of R on Linux, x86_64
OK
- Version checked
- 1.4.0
- Time taken
- 342 s
r-release-macos-arm64The current release of R on macOS, arm64
OK
- Version checked
- 1.4.0
- Time taken
- 62 s
r-release-macos-x86_64The current release of R on macOS, x86_64
OK
- Version checked
- 1.4.0
- Time taken
- 324 s
r-release-windows-x86_64The current release of R on Windows, x86_64
OK
- Version checked
- 1.4.0
- Time taken
- 392 s
- 13 OK
Over time
No change since 5 Aug 2026
As a list (8)
| Changed | Worst status | OK | Notes | Warnings | Errors |
|---|---|---|---|---|---|
| 5 Aug 2026 | OK | 13 | 0 | 0 | 0 |
| 1 Aug 2026 | Note | 12 | 1 | 0 | 0 |
| 21 May 2026 | OK | 13 | 0 | 0 | 0 |
| 20 May 2026 | Error | 12 | 0 | 0 | 1 |
| 25 Apr 2026 | OK | 12 | 0 | 0 | 0 |
| 13 Apr 2026 | Note | 11 | 3 | 0 | 0 |
| 30 Mar 2026 | Error | 10 | 3 | 0 | 1 |
| 10 Mar 2026 | Note | 11 | 3 | 0 | 0 |
Since March 2026
Downloads
Method, Downloads Method Download figures count requests logged by each distribution channel. They are not counts of installs or of users, because each channel publishes its own totals and this site reads them.Downloads
- Total downloads in the last 30 days
- 130,771+7.5% up on the 30 days before, the better directionIt is the sum of 5 channels: CRAN, r2u, autoCRAN, conda-forge and c2d4u.
CRAN rank
298 of 26,530
CRAN
124,390 downloads in the last 30 days
- Rank
- 298 of 26,530
- Change
- +6.3% up on the 30 days before, the better direction
It is in the total. Take it out
r2u
1,826 downloads in the last 30 days
- Rank
- 642 of 30,526
- Change
- +62.6% up on the 30 days before, the better direction
It is in the total. Take it out
autoCRAN
8 downloads in the last 30 days
- Rank
- 5,494 of 29,212
- Change
- −50% down on the 30 days before, the worse direction
It is in the total. Take it out
conda-forge
4,477 downloads in the last 30 days
- Rank
- 490 of 3,828
- Change
- +35.2% up on the 30 days before, the better direction
It is in the total. Take it out
c2d4u, no longer updated
70 downloads in the last 30 days
- Rank
- 400 of 7,575
- Change
- −34.6% down on the 30 days before, the worse direction
It is in the total. Take it out
The total is 130,771 downloads in the last 30 days. It is the sum of 5 channels: CRAN, r2u, autoCRAN, conda-forge and c2d4u.
Over time
Dependencies
- Needs
- 21
- Dependent packages
- 90
- Suggested by
- 160
Needs (21)
- base64enc
- bigD
- bitops
- cli
- commonmark
- dplyr
- fs
- glue
- grDevices
- htmltools
- htmlwidgets
- juicyjuice
- magrittr
- markdown
- reactable
- rlang
- sass
- scales
- tidyselect
- vctrs
- xml2
- Installing it adds
- 54 packages, 32.4 MB of source
- Of those, need compilation
- 28
Optional extras (21)
Dependent packages (50 of 90)
| Package | Title | Downloads in 30 days |
|---|---|---|
| gtsummary | Presentation-Ready Data Summary and Analytic Result Tables | 54,752 |
| gsDesign | Group Sequential Design | 12,586 |
| vcdExtra | 'vcd' Extensions and Additions | 6,303 |
| gtExtras | Extending 'gt' for Beautiful HTML Tables | 5,696 |
| pointblank | Data Validation and Organization of Metadata for Local and Remote Tables | 2,007 |
| modeltime | The Tidymodels Extension for Time Series Modeling | 1,554 |
| teal.widgets | 'shiny' Widgets for 'teal' Applications | 1,151 |
| nflplotR | NFL Logo Plots in 'ggplot2' and 'gt' | 1,114 |
| tsg | Generate Publication-Ready Statistical Tables | 977 |
| tfrmt | Applies Display Metadata to Analysis Results Datasets | 870 |
| gsDesign2 | Group Sequential Design with Non-Constant Effect | 862 |
| scan | Single-Case Data Analyses for Single and Multiple Baseline Designs | 768 |
| furniture | Furniture for Quantitative Scientists | 762 |
| docorator | Docorate (Decorate + Output) Displays | 587 |
| LightLogR | Process Data from Wearable Light Loggers and Optical Radiation Dosimeters | 551 |
| boot.pval | Bootstrap p-Values | 538 |
| tcpl | ToxCast Data Analysis Pipeline | 515 |
| actxps | Create Actuarial Experience Studies: Prepare Data, Summarize Results, and Create Reports | 507 |
| crane | Supplements the 'gtsummary' Package for Pharmaceutical Reporting | 490 |
| BayesERtools | Bayesian Exposure-Response Analysis Tools | 485 |
| tidyCDISC | Quick Table Generation & Exploratory Analyses on ADaM-Ish Datasets | 479 |
| BayesianReasoning | Plot Positive and Negative Predictive Values for Medical Tests | 463 |
| polish | Polishing Content for 'Word' and 'PowerPoint' | 461 |
| gtstats | Beginner-Friendly Statistics and Publication-Ready Tables | 456 |
| BasicStatsPlots | Publication-Ready Data Visualization and Simple Statistical Inference | 453 |
| UnalR | Wrapper for Interactive and Static Data Visualization | 450 |
| campsisnca | Non-Compartmental Analysis for Campsis Simulation Platform | 449 |
| ivo.table | Nicely Formatted Contingency Tables and Frequency Tables | 443 |
| chisquare | Chi-Square and G-Square Test of Independence, Power and Residual Analysis, Measures of Categorical Association | 426 |
| forestsearch | Exploratory Subgroup Identification in Survival and GLM Outcomes | 396 |
| metalite.ae | Adverse Events Analysis Using 'metalite' | 395 |
| gtregression | Tools for Creating Publication-Ready Regression Tables | 377 |
| RastaRocket | Rocket-Fast Clinical Research Reporting | 370 |
| biostats | Biostatistics and Clinical Data Analysis | 370 |
| surveyexplorer | Quickly Explore Complex Survey Data | 369 |
| RSP | 'shiny' Applications for Statistical and Psychometric Analysis | 359 |
| OhdsiReportGenerator | Observational Health Data Sciences and Informatics Report Generator | 356 |
| OmopViewer | Visualise OMOP Results using 'shiny' Applications | 352 |
| REDCapCAST | REDCap Metadata Casting and Castellated Data Handling | 351 |
| tablespan | Create Satisficing 'Excel', 'HTML', 'LaTeX', and 'RTF' Tables using a Simple Formula | 348 |
| GRShiny | Graded Response Model | 347 |
| alphavantagepf | 'Alphavantage Financial Data' API R Wrapper and Shiny Interface | 343 |
| CiteSource | Data-Driven Search Strategy Development and Evidence Synthesis Reporting | 332 |
| boinet | Conduct Simulation Study of Bayesian Optimal Interval Design with BOIN-ET Family | 332 |
| smdi | Perform Structural Missing Data Investigations | 332 |
| LogisticEnsembles | Automatically Runs 18 Logistic Models-14 Individual Logistic Models and 4 Ensembles of Models | 329 |
| crimeutils | A Comprehensive Set of Functions to Clean, Analyze, and Present Crime Data | 326 |
| plotor | Odds Ratio Tools for Logistic Regression | 325 |
| blindspiker | Laboratory Blind Spike Sample Analyses | 322 |
| autoFlagR | AI-Driven Anomaly Detection for Data Quality | 320 |
Code
Method, Code Method Code metrics come from reading the released source of each package version. The package is never installed, loaded or run.Code metrics
README, vignettes, a NEWS file and the shares read from its help pages. Files kept only in the repository, such as a pkgdown configuration or CI files, are read by the repository scan instead.
- Functions
- 1,145
- Public exports
- 202
- Lines of R code
- 84,241
- Median complexity
- 2
Functions (1,145)
Size and composition
Lines by kind (131,169)
| Kind | Lines | Share |
|---|---|---|
| R code | 84,241 | 64% |
| Tests | 7,532 | 6% |
| Documentation | 39,396 | 30% |
Lines by language
| Language | Lines | Share |
|---|---|---|
| R | 91,100 | 70% |
| Rd | 39,396 | 30% |
| Markdown | 673 | 0.5% |
Languages are counted from file extensions.
- Files
- 436
- R functions
- 1,145
- Object systems
- S3: 56 methods
Complexity
- Median
- 2
- Mean
- 4.2
- Highest
- 142
- Median lines per function
- 17
About complexity
Cyclomatic complexity counts the independent paths through a function: 1 is a straight line, higher is harder to test. R functions only.
Call graph figures
- R functions
- 1,145
- Calls
- 3,277
- Unconnected
- 49
- Groups
- 9
Growth (20 releases)
Release changes
Tests
The tests ran and coverage was measured.
- Lines run by tests
- 26.8%
- Expressions run by tests
- 30.7%
- Test cases
- 207
- Exports named in tests
- 39.1%
Coverage by file (91)
Coverage run
- Lines counted
- 28,433
- Lines the tests ran
- 7,631
- Tests passed
- Yes
- Measured with
- covr 3.6.5 on R 4.6.1
Test suite
- Has tests
- Yes
- Test frameworks
- testthat, tinytest
- Test cases
- 207
- Snapshot tests
- 14
- Lines of tests
- 7,532
- Test lines per line of code
- 0.09
Documentation
- Exports documented
- 99.5%
- Arguments documented
- 96%
- Return value documented
- 96.3%
- Help pages with examples
- 9.3%
- Examples run in checks
- 100%
Other documentation
- README
- No
- Release notes file
- Yes
- Help pages
- 216
- Lines of documentation
- 39,396
Datasets
Method, Datasets Method The datasets inside packages are read from their R objects in datasets
data/ folders when the code is analysed. Each object is described by its class, its shape and its columns, and fingerprinted so the same data can be found in other packages.data() are listed, 76,161 on CRAN and 8,045 on Bioconductor, so the list is not every file in data/.
36 datasets, 18 can be loaded by name
| Dataset | Size | Columns |
|---|---|---|
| constantsThe fundamental physical constants | 354 × 6 | name, value, uncert, sf_ |
| countrypopsYearly populations of countries from 1960 to 2024 | 13,975 × 5 | country_ |
| exibbleA toy example tibble for testing with gt: exibble | 8 × 9 | num, char, fctr, date, time, datetime and 3 more |
| filmsFeature films in competition at the Cannes Film Festival | 1,873 × 8 | year, title, original_ |
| gibraltarWeather conditions in Gibraltar, May 2023 | 1,431 × 10 | date, time, temp, dew_ |
| gtcarsDeluxe automobiles from the 2014-2017 period | 47 × 15 | mfr, model, year, trim, bdy_ |
| illnessLab tests for one suffering from an illness | 39 × 11 | test, units, day_ |
| metroThe stations of the Paris Metro | 321 × 11 | name, caption, lines, connect_ |
| nuclidesNuclide data | 3,383 × 29 | nuclide, z, n, element, radius, radius_ |
| peepsA table of personal information for people all over the world | 100 × 14 | name_ |
| photolysisData on photolysis rates for gas-phase organic compounds | 34 × 10 | cmpd_ |
| pizzaplaceA year of pizza sales from a pizza place | 49,574 × 7 | id, date, time, name, size, type and 1 more |
More datasets (24)
| Dataset | Size | Columns |
|---|---|---|
| reactionsReaction rates for gas-phase atmospheric reactions of organic compounds | 1,683 × 39 | cmpd_ |
| rx_ | 291 × 20 | STUDYID, STUDYIDN, USUBJID, TRTA, TRTAN, ITTFL and 14 more |
| rx_ | 182 × 14 | STUDYID, STUDYIDN, USUBJID, TRTA, TRTAN, ITTFL and 8 more |
| sp500Daily S&P 500 Index data from 1950 to 2015 | 16,607 × 7 | date, open, high, low, close, volume and 1 more |
| szaTwice hourly solar zenith angles by month & latitude | 816 × 4 | latitude, month, tst, sza |
| townyPopulations of all municipalities in Ontario from 1996 to 2021 | 414 × 25 | name, website, status, csd_ |
| conversion_ | 1,038 × 4 | type, from, to, conv_ |
| country_ | 242 × 576 | |
| country_ | 28 × 3 | country_ |
| css_ | 148 × 4 | color_ |
| currencies | 172 × 5 | curr_ |
| currency_ | 20 × 2 | curr_ |
| default_ | 228 × 2 | default_ |
| durations | 2,391 × 41 | locale, type, duration-week. |
| flag_ | 242 × 4 | country_ |
| fractions | 1,001 × 4 | x, low, med, high |
| google_ | 251 × 4 | name, tag, min_ |
| google_ | 1,313 × 5 | name, designer, license, category, date_ |
| google_ | 3,027 × 7 | name, style, weight, filename, post_ |
| locales | 574 × 47 | locale, lang_ |
| palettes_ | 840 × 6 | package, palette, length, type, novelty, colors |
| spelled_ | 101 × 81 | number, af, ak, am, ar, az and 75 more |
| styles_ | 36 × 16 | color, style, table_ |
| tf_ | 6 × 575 |
People
Method, People Method People on the site are the names packages give them in their Author and maintainer identity
DESCRIPTION files: authors from the author list, and the maintainer from the Maintainer field. Spellings of one name become one person only where the rules below allow it, and when in doubt the rules keep people apart.
Maintainer since 0.2.0.5 (2020), author
Posit Software, PBC, an organisation
Copyright holder
Author
Author
Author
Author
Author
Author
Author
Author
Author
Funded by Posit Software, PBC
Earlier names (1)
- RStudio
Repository
Method, figures by host Method Repository signals are the figures read from the source repository a package links to: stars, forks, issues, commits, releases and the time issues take to close. They are read from GitHub, GitLab, Codeberg and Bitbucket.Repository signals
URL and BugReports fields of its DESCRIPTION file. Read-only mirrors, the cran and bioc accounts on GitHub and git.bioconductor.org, are left out.
- Stars
- 2,162no change on 30 days ago
- Forks
- 228
- Open issues
- 245
- Last commit
- 15 Oct 2026
Activity
- Commits
- 9,575
- Open pull requests
- 20
- Tagged releases
- 20
- Latest tagged release
- v1.4.0, 15 Oct 2026
- In development
- Default branch at 1.4.0.9000, ahead of CRAN 1.4.0 (checked 2026-10-25)
- Issues closed in
- 1,374 days (median)
- Pull requests closed in
- 0 days (median)
- Pull requests merged
- 93%
- Created
- 20 Mar 2018
- Licence file reads as
- –
Development practices (15)
| Kind | Found |
|---|---|
| Continuous integration | GitHub Actions, R CMD check workflow The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel |
| Governance and community | Code of conduct, Contributing guide, Issue templates, PR template, Security policy |
| Docs source | pkgdown GitHub Pages site last deployed 2026-10-15 The repository has a site deploy workflow pkgdown site last built 2026-10-15 |
| Coverage | Coverage reporting (Codecov) |
| Reproducibility and dev environment | data-raw/ |
| Research and citation | CITATION.cff |
| Lint, format, editor | RStudio project |
| Git structural | .gitattributes |
Method, repository practices Method Beta Each week a scan of the public source repository a package links to looks for the tools a maintainer has set up, and the Repository section lists the findings. Repositories on GitHub and GitLab are scanned.Repository practices
R CMD build reads .Rbuildignore and leaves out files used only in development, such as .github/, .lintr, renv/, a Dockerfile and cran-comments.md, so the released source file holds almost none of them. The repository is the one place these files stay visible.
AI tools
Method, AI tools Method Beta What is found in a repository is not a measure of the code.AI tool findings
Tools
| Tool | First seen | Found |
|---|---|---|
| GitHub Copilot | 15 Nov 2025 | Pull request: opened by its own account |
- Pull request
History
Method, History Method Archived is built from CRAN's archive records, its list of check deadlines and Bioconductor's package records. Every figure is counted to 28 Oct 2026, the day the data was read.Packages leaving
| Version | Released | R |
|---|---|---|
| 1.4.0 current | 15 Oct 2026 | 4.6.1 |
| 1.3.0 | 22 Jan 2026 | 4.5.2 |
| 1.2.0 | 16 Dec 2025 | 4.5.2 |
| 1.1.0 | 24 Sep 2025 | 4.5.1 |
| 1.0.0 | 5 Apr 2025 | 4.4.3 |
| 0.11.1 | 4 Oct 2024 | 4.4.1 |
| 0.11.0 | 10 Jul 2024 | 4.4.1 |
| 0.10.1 | 18 Jan 2024 | 4.3.2 |
Earlier versions (12)
Release notes (1.4.0)
New features
- The new
rows_hide()androws_unhide()functions control row visibility, mirroringcols_hide()andcols_unhide(). Hidden rows are excluded from the rendered table but can still be targeted inrowsexpressions, and summary rows are calculated from the visible rows only. (#2127) - Numeric formatting functions (
fmt_number(),fmt_scientific(),fmt_engineering(),fmt_percent(),fmt_currency(), and others) gain adrop_leading_zeroargument. Setting this toTRUEremoves the leading zero from values between -1 and 1 (e.g.,0.75becomes.75), which is useful for displaying correlations, p-values, and other bounded statistics (#2146). (#2155) - Tables can now be saved as PowerPoint files with
gtsave()by using the.pptxfile extension. This is powered by a new OOXML rendering engine that aims to unify Word and PowerPoint output (#97). (@thebioengineer, @romainfrancois, #2158) gt_group()can now combinegt_groupobjects withgt_tblobjects (#2128). (@shannonhaughton, #2129)- Tables with no data rows now display a locale-appropriate message (e.g.,
"Table has no data") in the body area for both HTML and LaTeX output. The message can be customized viatab_options(table.no_data_message = "...")or suppressed by setting it to""(#1881).
Upcoming changes
- gt's internals and documentation now use the base pipe (
|>) throughout. gt still re-exports%>%,dplyr::vars(), andtidyselect::one_of(), but these re-exports will be removed in a future release. Packages relying on them should import them directly from magrittr, dplyr, or tidyselect. (@olivroy, #2150)
Minor improvements and bug fixes
- Fixed LaTeX and RTF output for unformatted
Datecolumns, which now show calendar dates instead of day counts since the Unix epoch (#2177). (@LeonidasZhak, #2180) - Rows in LaTeX output tables no longer overlap when cell text contains line breaks (#2178). (#2179)
- Fixed
cols_merge()with<</>>patterns producing corrupted output when data values contain<or>characters, particularly in LaTeX output (#2153). (#2156) - Fixed
gt_split()failing on grouped data frames by filtering stale row group metadata after subsetting rows (#2089). (#2157) - Fixed
md()in a column label causing the column to expand to full page width (\linewidth) in LaTeX/PDF output when no explicit column width is set (#2124). (#2162) - Fixed
text_transform()passing HTML-escaped text (e.g.,&) to the user-supplied function instead of the original display text; functions likestringr::str_to_title()now receive and transform plain text as expected (#2033). (#2163) - Fixed
text_replace()failing to match patterns containing LaTeX special characters (e.g., underscores) in LaTeX/PDF output. The same plain-text pattern now works consistently in both HTML and LaTeX (#1592). (#2165) - Styles applied with
tab_style()tocells_column_spanners()are no longer dropped whentab_style()is called beforetab_spanner()(#1438). (#2174) - The
headersattributes on<td>elements in HTML output tables now match theidattributes of their column headings when column names contain spaces, improving accessibility (#2085). (#2173) - The vertical alignment of the row group column (with
row_group_as_column = TRUE) can now be set withtab_style()through body cell styles. (#2176) - Fixed cell misalignment when using
summary_rows(side = "top")withrow_group.as_column = TRUEand no stub column (#1561). (#2175) - Styling can now be applied to summary rows in LaTeX output tables without error (#2117). (@thebioengineer, #2123)
- Fixed multi-column stub rowspans incorrectly crossing row-group boundaries when adjacent groups share the same stub value, which caused group labels to appear in the wrong rows (#2121). (#2161)
- Fixed grand summary rows rendering incorrectly in HTML output tables with a multi-column stub (#2164). (@ChidiebereNjoku, #2167)
- Fixed higher-level column spanners not displaying correctly when a multi-column stub is present (#2170). (@ysaidani, #2171)
- Fixed
cells_stub()incorrectly resolving footnote row indices when a multi-column stub has repeated labels across non-contiguous groups (#2168). (@ysaidani, #2169) - Improved RTF handling of column headers and spanners in tables with a multi-column stub (#2118). (@thebioengineer, #2145)
- Empty strings marked with
md()are now handled correctly in Word output tables (#2119). (@thebioengineer, #2120) - The
keep_with_nextparameter is now applied consistently inas_word()(#2149). (@shannonhaughton, #2151) - Removed usage of
dplyr::case_match(), which is deprecated as of dplyr 1.2.0. (@olivroy, #2125) - Fixed several typos in the documentation. (@jeis4wpi, #2152)