An R package for creating publication-quality, information-rich tables with a cohesive and flexible API.
gt is an R package that enables users to easily generate information-rich, publication-quality tables from data frames or tibbles. It solves the problem of creating visually appealing and well-structured tables for reports, documents, and presentations directly within the R programming environment. The package provides a flexible API for formatting and customizing tables, which can be exported to HTML, LaTeX, or RTF formats.
R users, data scientists, researchers, and analysts who need to create professional tables for reports, academic papers, dashboards, or any communication of tabular data. It is particularly useful for those working within the R Markdown or Shiny ecosystems.
Developers choose gt for its cohesive design philosophy, which breaks down table construction into logical parts, making it intuitive yet highly customizable. Unlike basic table functions, it offers extensive formatting options and supports multiple output formats, bridging the gap between data analysis and polished presentation.
Easily generate information-rich, publication-quality tables from R
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The package's philosophy centers on logical table parts like headers, stubs, and footers, making construction intuitive and modular, as illustrated in the README's workflow diagram.
Offers extensive functions for formatting numbers, currencies, dates, and text, demonstrated in the sp500 example with fmt_currency() and fmt_date().
Tables can be rendered to HTML, LaTeX, and RTF, enabling seamless integration into web pages, academic papers, and documents, as highlighted in the key features.
Includes comprehensive documentation, 18 included datasets for experimentation, and active community support via GitHub Discussions and Discord, as shown in the badges and links.
As an R package, it's only useful within the R environment, limiting adoption for teams using other programming languages or tools.
Tables are primarily static; for interactive features like sorting or filtering, additional JavaScript libraries or packages are required, which isn't natively supported.
While simple for basic tables, creating highly complex layouts with custom styling can involve extensive code and familiarity with the API, as hinted by the need for deep customization.