Skip to content

Easily Create Presentation-Ready Display Tables

89packages dependsuggested by 160
1.9Mdownloads / year
26.8%test coverage
13/13flavors OK

Overview

About

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.

Changes in 1.4.0

New features

  • The new rows_hide() and rows_unhide() functions control row visibility, mirroring cols_hide() and cols_unhide(). Hidden rows are excluded from the rendered table but can still be targeted in rows expressions, 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 a drop_leading_zero argument. Setting this to TRUE removes the leading zero from values between -1 and 1 (e.g., 0.75 becomes .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 .pptx file 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 combine gt_group objects with gt_tbl objects (#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 via tab_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(), and tidyselect::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 Date columns, 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)
Show all changes in 1.4.0Hide the rest of the changes in 1.4.0
  • 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., &amp;) to the user-supplied function instead of the original display text; functions like stringr::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() to cells_column_spanners() are no longer dropped when tab_style() is called before tab_spanner() (#1438). (#2174)
  • The headers attributes on <td> elements in HTML output tables now match the id attributes 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 with tab_style() through body cell styles. (#2176)
  • Fixed cell misalignment when using summary_rows(side = "top") with row_group.as_column = TRUE and 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_next parameter is now applied consistently in as_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)

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 7.0 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-05-21
  • ERROR12 OK, 1 ERROR2026-05-20
  • OK12 OK2026-04-25
Show 3 earlier changesHide 3 earlier changes
  • NOTE11 OK, 3 NOTE2026-04-13
  • ERROR10 OK, 3 NOTE, 1 ERROR2026-03-30
  • NOTE11 OK, 3 NOTE2026-03-10
Advisories

none known

Documentation

In release 1.4.0
README· In the repository, left out of the releaseVignettes· In the repository, left out of the releaseNEWSYes · 100% structured · mentions 1.4.0Citation fileNoWebsiteYes · pkgdown
Help pages
216 (8 internal)includes a package overview page
Examples that run
100%20 run in a plain check
Exported functions with examples
0%
Documented parameters
96%
Return-value docs
96%
Help pages citing references
0%

Downloads

1.9M
CRAN downloads in the past year
Rank #304 · ~5.2K/day · ~157.2K/mo
Daily download trend is not available in this view yet.
119.1K30 days
364.7K90 days
1.9M1 year
Compare downloads with other packages →
Also on13.4K r2u9 autocran39.1K conda_forge497 c2d4u

Repository

rstudio/gt ↗Organization: rstudio
2,163Stars
228Forks
290Open issues
19Open PRs
20Releases
9,575Commits
61Commit identities
rsummary-tableseasy-to-usedocxhtmllatexrtf
9,575 commits · Last activity 2026-10-15 · +0.1% stars, 30d · Discussions: 87 posts
Responsiveness
How these are sampled
PRs merged (all time)
93%
Median days to close, 50 most recently updated closed issues
274
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-10-16 · 2,1042026-10-14 · 2,163
PracticesBeta

15 development-tooling and community-health practices detected across 8 families in the upstream repository

Checks run against github.com/rstudio/gt on 2026-10-11.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (5)
Code of conductContributing guideIssue templatesPR templateSecurity policy
Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-09-14 · The repository has a site deploy workflow

pkgdown site last built 2026-09-14, before release 1.4.0 (2026-10-15)

Coverage (1)
Coverage reporting (Codecov)
Show all practicesHide 4 practices
Reproducibility and dev environment (1)
data-raw/
Research and citation (1)
CITATION.cff
Lint, format, editor (1)
RStudio project
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • GitHub Copilotfirst seen 2025-11-15
    Pull request: opened by its own account
How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
40 external dependencies (excludes base and recommended)

Installing gt adds 54 packages (28 with compiled code, 32 MB of source tarballs). Heaviest: bslib 5.6 MB, sass 2.9 MB, rmarkdown 2.1 MB.

Depends (1)
R >= 4.1.0
LinkingTo (0)
none
Enhances (0)
none

Datasets

People & History

People (11)
Author, Maintainer since 0.2.0.5 (2020)
Author · added in 0.11.0
Author
Author · added in 1.2.0
Author · added in 1.2.0
Author · added in 0.7.0
Author · added in 0.9.0
Author · added in 0.11.0
Author · added in 0.8.0
Copyright holder, Funder · added in 0.9.0
Listed in earlier versions (1)
RStudio
no longer listed · 0.2.0.5 to 0.8.0
Releases (20)

Pick two releases to compare their code metrics.

  • 1.4.0Latest
    record
    2026-10-15 · current release · diff ↗ ·
    added 2 exports
    rows_hide, rows_unhide
    ·
    5 hours in CRAN's queue
    Listed in CRAN's incoming queue from 2026-10-14 19:53 to 2026-10-15 01:08 UTC, in 3 readings.
  • R
    R 4.6.0 released · 2026-04-24
  • 1.3.0
    record
    2026-01-22 · diff ↗ ·
    added 2 exports
    info_tf_style, row_order
  • 1.2.0
    record
    2025-12-16 · diff ↗ ·
    added 4 exports
    fmt_number_si, opt_footnote_order, summary_columns, vec_fmt_number_si
  • 1.1.0
    record
    2025-09-24 · diff ↗ ·
    added 1 export
    latex
  • R
    R 4.5.0 released · 2025-04-11
  • 1.0.0
    record
    2025-04-05 · diff ↗ ·
    added 1 export
    gt_update_select
  • 0.11.1
    record
    2024-10-04 · diff ↗ ·
    added 3 exports
    all_of, any_of, where
  • 0.11.0
    record
    2024-07-10 · diff ↗ ·
    removed 1 export
    define_units
    added 8 exports
    as_gtable, fmt_chem, fmt_country, fmt_email, fmt_tf, info_unit_conversions, row_group, unit_conversion
  • R
    R 4.4.0 released · 2024-04-24
  • 0.10.1
    record
    2024-01-18 · diff ↗
  • 0.10.0
    record
    2023-10-07 · diff ↗ ·
    added 12 exports
    cols_add, cols_nanoplot, cols_units, define_units, extract_body, fmt_icon, fmt_units, from_column, info_flags, info_icons, nanoplot_options, rows_add
  • R
    R 4.3.0 released · 2023-04-21
  • 0.9.0
    record
    2023-03-31 · diff ↗ ·
    added 24 exports
    cols_label_with, fmt_auto, fmt_bins, fmt_flag, fmt_image, fmt_index, fmt_spelled_num, fmt_url, grp_add, grp_clone, grp_options, grp_pull, grp_replace, grp_rm, gt_group, gt_split, opt_footnote_spec, opt_interactive, system_fonts, text_case_match, text_case_when, text_replace, vec_fmt_index, vec_fmt_spelled_num
  • 0.8.0
    record
    2022-11-17 · diff ↗ ·
    added 15 exports
    cols_align_decimal, extract_cells, fmt_roman, rm_caption, rm_footnotes, rm_header, rm_source_notes, rm_spanners, rm_stubhead, stub, sub_values, tab_caption, tab_info, tab_style_body, vec_fmt_roman
  • 0.7.0
    record
    2022-08-25 · diff ↗ ·
    added 18 exports
    as_word, fmt_duration, opt_stylize, tab_stub_indent, vec_fmt_bytes, vec_fmt_currency, vec_fmt_date, vec_fmt_datetime, vec_fmt_duration, vec_fmt_engineering, vec_fmt_fraction, vec_fmt_integer, vec_fmt_markdown, vec_fmt_number, vec_fmt_partsper, vec_fmt_percent, vec_fmt_scientific, vec_fmt_time
Show 12 earlier eventsHide 12 earlier events
  • 0.6.0
    record
    2022-05-24 · diff ↗ ·
    added 5 exports
    fmt_partsper, sub_large_vals, sub_missing, sub_small_vals, sub_zero
  • 0.5.0
    record
    2022-04-22 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 0.4.0
    record
    2022-02-15 · diff ↗ ·
    added 3 exports
    fmt_fraction, opt_horizontal_padding, opt_vertical_padding
  • 0.3.1
    record
    2021-08-07 · diff ↗ ·
    added 2 exports
    fmt_engineering, fmt_integer
  • R
    R 4.1.0 released · 2021-05-18
  • 0.3.0
    record
    2021-05-12 · diff ↗ ·
    removed 1 export
    cells_data
    added 8 exports
    cells_footnotes, cells_source_notes, cells_stub_grand_summary, cells_stub_summary, cols_merge_n_pct, cols_unhide, fmt_bytes, num_range
  • 0.2.2
    record
    2020-08-06 · diff ↗ ·
    added 6 exports
    css, default_fonts, google_font, info_google_fonts, opt_css, opt_table_font
  • 0.2.1
    record
    2020-05-23 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 0.2.0.5
    record
    2020-03-31
  • R
    R 3.6.0 released · 2019-04-26
Across CRAN, the median accepted release of the past year spent 19 hours in the queue, 90% under 11 days.How queue time is measured

Package metadata

First published
2020-03-31
Total releases
20 / 6 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1.0
Bundled data
856 KB / 18 files
Download size
3.3 MB
Appears in task views

Cite

Cite this 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

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

The repository also keeps a CITATION.cff.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for gt version 1.4.0 [Data set]. HJJB, LLC. Data release v2026-10-18. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy