gt
Easily generate information-rich, publication-quality tables from R
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
4 of 55 committers (7.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.1%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Easily generate information-rich, publication-quality tables from R
Basic Info
- Host: GitHub
- Owner: rstudio
- License: other
- Language: R
- Default Branch: master
- Homepage: https://gt.rstudio.com
- Size: 292 MB
Statistics
- Stars: 2,114
- Watchers: 47
- Forks: 219
- Open Issues: 301
- Releases: 0
Topics
Metadata Files
README.md
With the gt package, anyone can make wonderful-looking tables using the R programming language. The gt philosophy: we can construct a wide variety of useful tables with a cohesive set of table parts. These include the table header, the stub, the column labels and spanner column labels, the table body, and the table footer.
It all begins with table data (be it a tibble or a data frame). You
then decide how to compose your gt table with the elements and
formatting you need for the task at hand. Finally, the table is rendered
by printing it at the console, including it in an R Markdown document,
or exporting to a file using gtsave(). Currently, gt supports the
HTML, LaTeX, and RTF output formats.
The gt package is designed to be both straightforward yet powerful.
The emphasis is on simple functions for the everyday display table
needs. Here is a brief example of how to use gt to create a table
from the included sp500 dataset:
``` r library(gt)
Define the start and end dates for the data range
startdate <- "2010-06-07" enddate <- "2010-06-14"
Create a gt table based on preprocessed
sp500 table data
sp500 |> dplyr::filter(date >= startdate & date <= enddate) |> dplyr::select(-adjclose) |> gt() |> tabheader( title = "S&P 500", subtitle = glue::glue("{startdate} to {enddate}") ) |> fmtcurrency() |> fmtdate(columns = date, datestyle = "wdmdayyear") |> fmt_number(columns = volume, suffixing = TRUE) ```
There are 18 datasets provided by gt: countrypops, sza, gtcars, sp500, pizzaplace, exibble, towny, peeps, films, metro, gibraltar, constants, illness, reactions, photolysis, nuclides, rx_adsl, and rx_addv.
All of this tabular data is great for experimenting with gts functions and we make extensive use of these datasets in our documentation.
Beyond the functions shown in the simple sp500-based example, there are many functions available in gt for creating super-customized tables. Check out the documentation website to get started via introductory articles for making gt tables. There's a handy Reference section that has detailed help for every function in the package.
With the gt Test Drive, you can try gt in the Posit Cloud environment that features the RStudio IDE and a large collection of ready-to-run examples. Visit the publicly available Posit Cloud project and try out the package in your browser. There's no charge to use this platform and you'll learn a lot about what the package can do!
Let's talk about making tables with gt! There are a few locations where there is much potential for discussion.
One such place is in GitHub Discussions. This discussion board is especially great for Q&A, and many people have had their problems solved in there.
Another fine venue for discussion is in the gt_package Discord server. This is a good option for asking about the development of gt, pitching ideas that may become features, and sharing your table creations!
Finally, there is the gt-package Bluesky account. There you'll find posts about gt (including sneak previews about in-development features) and other table-generation packages.
These are all great places to ask questions about how to use the package, discuss some ideas, engage with others, and much more!
INSTALLATION
The gt package can be installed from CRAN with:
r
install.packages("gt")
You can also choose to install the development version of gt from GitHub:
r
devtools::install_github("rstudio/gt")
If you encounter a bug, have usage questions, or want to share ideas to make this package better, please feel free to file an issue.
Packages that use or extend gt
There are several R packages that either use gt to generate tabular outputs or extend gt in amazing ways. Here is a short list of some of these great packages:
- gtsummary(GITHUB,WEBSITE)
- gtExtras(GITHUB,WEBSITE)
- pointblank(GITHUB,WEBSITE)
- tfrmt(GITHUB,WEBSITE)
- gto(GITHUB)
Code of Conduct
Please note that the gt project is released with a contributor code of
conduct.
By
participating in this project you agree to abide by its terms.
License
gt is licensed under the MIT license. See the
LICENSE.md file for more details.
Posit Software, PBC.
Governance
This project is primarily maintained by Rich Iannone. Other authors may occasionally assist with some of these duties.
Owner
- Name: RStudio
- Login: rstudio
- Kind: organization
- Email: info@rstudio.org
- Location: Boston, MA
- Website: http://rstudio.org
- Repositories: 356
- Profile: https://github.com/rstudio
GitHub Events
Total
- Create event: 8
- Commit comment event: 163
- Release event: 1
- Issues event: 89
- Watch event: 109
- Delete event: 2
- Issue comment event: 163
- Push event: 90
- Pull request review comment event: 19
- Pull request review event: 50
- Pull request event: 64
- Fork event: 21
Last Year
- Create event: 8
- Commit comment event: 163
- Release event: 1
- Issues event: 89
- Watch event: 109
- Delete event: 2
- Issue comment event: 163
- Push event: 90
- Pull request review comment event: 19
- Pull request review event: 50
- Pull request event: 64
- Fork event: 21
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Richard Iannone | r****e@m****m | 6,695 |
| olivroy | o****1@h****m | 444 |
| Ellis Hughes | e****s@g****m | 100 |
| kbrevoort | k****n@b****m | 46 |
| Teun van den Brand | t****d@g****m | 30 |
| Aaron Gullickson | a****n@g****m | 24 |
| JooYoung Seo | j****5@i****u | 20 |
| Joe Cheng | j****e@r****m | 16 |
| Jon Harmon | j****n@a****m | 16 |
| Maximilian Girlich | m****h@m****m | 16 |
| Carlos Scheidegger | c****r@r****m | 16 |
| Niels Bock | nb@p****k | 16 |
| Alexandra Lauer | 4****r | 15 |
| Stuart Lodge | l****t@g****m | 10 |
| Shannon Haughton | s****n@g****m | 9 |
| Michael Chirico | c****m@g****m | 9 |
| Daniel Sjoberg | d****g@g****m | 7 |
| Stefan Nygaard Hansen | s****n@g****m | 6 |
| your name | e****n@g****m | 5 |
| Michael McCarthy | 5****g | 4 |
| Christophe Dervieux | c****x@g****m | 4 |
| Magnus Dehli Vigeland | m****v@m****o | 3 |
| Robrecht Cannoodt | r****d@g****m | 3 |
| Christopher Kenny | c****4@c****u | 3 |
| Barret Schloerke | b****t@r****m | 3 |
| obsaditelnost | g****b@d****e | 3 |
| dermirko | g****b@d****e | 2 |
| Kenneth Brevoort | k****t@K****l | 2 |
| Bill Denney | w****y@h****m | 2 |
| Rebecca Butler | r****5@m****u | 2 |
| and 25 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 540
- Total pull requests: 508
- Average time to close issues: over 1 year
- Average time to close pull requests: 10 days
- Total issue authors: 315
- Total pull request authors: 37
- Average comments per issue: 1.48
- Average comments per pull request: 1.09
- Merged pull requests: 434
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 82
- Pull requests: 105
- Average time to close issues: 14 days
- Average time to close pull requests: 4 days
- Issue authors: 66
- Pull request authors: 18
- Average comments per issue: 0.52
- Average comments per pull request: 1.3
- Merged pull requests: 75
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- rich-iannone (39)
- olivroy (34)
- bzkrouse (12)
- ddsjoberg (11)
- thebioengineer (6)
- rjazwiec (6)
- slodge (6)
- shannonhaughton (6)
- alex-lauer (6)
- LukasWallrich (6)
- kendonB (5)
- szimmer (5)
- AlbertRapp (5)
- mine-cetinkaya-rundel (4)
- daattali (4)
Pull Request Authors
- olivroy (213)
- rich-iannone (193)
- thebioengineer (14)
- kbrevoort (13)
- teunbrand (11)
- shannonhaughton (6)
- AaronGullickson (6)
- obsaditelnost (5)
- MichaelChirico (4)
- slodge (4)
- magnusdv (4)
- rkb965 (3)
- jonthegeek (2)
- mcanouil (2)
- remlapmot (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
-
Total downloads:
- cran 213,296 last-month
- Total docker downloads: 51,198
-
Total dependent packages: 86
(may contain duplicates) -
Total dependent repositories: 338
(may contain duplicates) - Total versions: 41
- Total maintainers: 1
cran.r-project.org: gt
Easily Create Presentation-Ready Display Tables
- Homepage: https://gt.rstudio.com
- Documentation: http://cran.r-project.org/web/packages/gt/gt.pdf
- License: MIT + file LICENSE
-
Latest release: 1.0.0
published 11 months ago
Rankings
Maintainers (1)
proxy.golang.org: github.com/rstudio/gt
- Documentation: https://pkg.go.dev/github.com/rstudio/gt#section-documentation
- License: other
-
Latest release: v1.0.0
published 11 months ago
Rankings
conda-forge.org: r-gt
- Homepage: https://gt.rstudio.com/
- License: MIT
-
Latest release: 0.8.0
published over 3 years ago
Rankings
Dependencies
- actions/checkout v2 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- R >= 3.2.0 depends
- base64enc >= 0.1 imports
- bigD >= 0.2 imports
- bitops >= 1.0 imports
- cli >= 3.4.1 imports
- commonmark >= 1.8 imports
- dplyr >= 1.0.8 imports
- fs >= 1.5.2 imports
- ggplot2 >= 3.3.5 imports
- glue >= 1.6.1 imports
- htmltools >= 0.5.2 imports
- htmlwidgets >= 1.6.1 imports
- juicyjuice >= 0.1.0 imports
- magrittr >= 2.0.2 imports
- reactable >= 0.2.3 imports
- rlang >= 1.0.2 imports
- sass >= 0.4.1 imports
- scales >= 1.2.0 imports
- tibble >= 3.1.6 imports
- tidyselect >= 1.1.1 imports
- RColorBrewer * suggests
- covr * suggests
- digest >= 0.6.29 suggests
- knitr * suggests
- lubridate * suggests
- paletteer * suggests
- rmarkdown * suggests
- rvest * suggests
- shiny * suggests
- testthat >= 3.0.0 suggests
- tidyr * suggests
- webshot2 * suggests
- xml2 * suggests
- actions/checkout v3 composite
- nwtgck/actions-netlify v2.0 composite
- quarto-dev/quarto-actions/setup v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite