All Projects → rstudio → Gt

rstudio / Gt

Licence: other
Easily generate information-rich, publication-quality tables from R

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Gt

Gtsummary
Presentation-Ready Data Summary and Analytic Result Tables
Stars: ✭ 450 (-64.29%)
Mutual labels:  easy-to-use, html5
Broken Link Checker
Find broken links, missing images, etc within your HTML.
Stars: ✭ 1,237 (-1.83%)
Mutual labels:  html5
Games
一个基于Phaser的小游戏集合
Stars: ✭ 1,167 (-7.38%)
Mutual labels:  html5
30diasdecss
Desafio criar 30 mini projetos utilizando HTML e CSS em 30 dias
Stars: ✭ 1,203 (-4.52%)
Mutual labels:  html5
Wheel Of Lunch
HTML5 randomised spinning wheel to select a place to eat by using a RESTful API to fetch local places.
Stars: ✭ 70 (-94.44%)
Mutual labels:  html5
Olog
📔 Online Note-Taking Experience | 即时灵感笔记记录平台
Stars: ✭ 79 (-93.73%)
Mutual labels:  html5
Sao
Mirror of Tryton web client - Sao
Stars: ✭ 67 (-94.68%)
Mutual labels:  html5
Html File Upload
Useful HTML file upload tips for web developers
Stars: ✭ 83 (-93.41%)
Mutual labels:  html5
Larkplayer
🚀 A lightweight & flexible web player :)
Stars: ✭ 82 (-93.49%)
Mutual labels:  html5
Sumoeasyminer
The most easy, intuitive CPU miner for cryptonote-based cryptocurrency
Stars: ✭ 77 (-93.89%)
Mutual labels:  easy-to-use
Noduino
JavaScript and Node.js Framework for controlling Arduino with HTML and WebSockets
Stars: ✭ 1,202 (-4.6%)
Mutual labels:  html5
Ggvenn
Venn Diagram by ggplot2, with really easy-to-use API.
Stars: ✭ 72 (-94.29%)
Mutual labels:  easy-to-use
Hugo Uilite
Stars: ✭ 79 (-93.73%)
Mutual labels:  html5
Unicorn
Unicorn - W3C's Unified Validator
Stars: ✭ 70 (-94.44%)
Mutual labels:  html5
Front End Resource Collection
前后端日常总结
Stars: ✭ 82 (-93.49%)
Mutual labels:  html5
Redpacketrain
红包雨
Stars: ✭ 68 (-94.6%)
Mutual labels:  html5
Sequential
An environment to visualize JavaScript code execution in a browser
Stars: ✭ 74 (-94.13%)
Mutual labels:  html5
Neo
Create blazing fast multithreaded Web Apps
Stars: ✭ 1,219 (-3.25%)
Mutual labels:  html5
P32929.github.io
Second iteration of my portfolio - created using ReactJS, Material-UI, Overmind, etc
Stars: ✭ 84 (-93.33%)
Mutual labels:  easy-to-use
Muse
🎧 All you need is a simple and diligent HTML 5 music player written in React.
Stars: ✭ 82 (-93.49%)
Mutual labels:  html5

gt

Lifecycle: maturing CRAN status R build status Coverage status

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 preprocessed 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 HTML output, with LaTeX and RTF planned for the future.

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:

library(gt)
library(tidyverse)
library(glue)

# Define the start and end dates for the data range
start_date <- "2010-06-07"
end_date <- "2010-06-14"

# Create a gt table based on preprocessed
# `sp500` table data
sp500 %>%
  dplyr::filter(date >= start_date & date <= end_date) %>%
  dplyr::select(-adj_close) %>%
  gt() %>%
  tab_header(
    title = "S&P 500",
    subtitle = glue::glue("{start_date} to {end_date}")
  ) %>%
  fmt_date(
    columns = vars(date),
    date_style = 3
  ) %>%
  fmt_currency(
    columns = vars(open, high, low, close),
    currency = "USD"
  ) %>%
  fmt_number(
    columns = vars(volume),
    suffixing = TRUE
  )

There are six datasets included in gt: countrypops, sza, gtcars, sp500, pizzaplace, and exibble. All of them are useful for experimenting with gt’s functions.

Beyond this simple example, there are many functions available in gt for creating super-customized tables.

Want to try this out? Then, take the gt Test Drive on RStudio Cloud. It’s full of ready-to-run examples.

RStudio Cloud Example

The gt package can be installed from CRAN with:

install.packages("gt")

You can also choose to install the development version of gt from GitHub:

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.


How gt fits in with Other Packages that Generate Display Tables

The gt package joins a burgeoning collection of packages for display table generation. Why another? We feel that there is enough room in this space to innovate further. Here are some of the ways that gt contributes to this ecosystem:

  • the interface is high-level and declarative (general instructions versus very specific)
  • the formatting options are ‘batteries included’ (scientific notation, uncertainty, ranges, percentages, suffixes, localized currency, dates/times + much more)
  • there is excellent, pain-free support for footnotes
  • the output is ‘camera-ready’
  • it will eventually support multiple output formats (including LaTeX) with the same declarative interface
  • the API closely follows tidyverse conventions by adhering to the tidyverse style guide
  • a focus on making the package documentation and examples the best they can be
  • rigorous QA/QC measures: high test coverage for automated tests, and thorough manual testing by QA engineers (with every proposed code change)

While gt is trying to do something different with its own interface, it may not suit your specific needs. Here is a listing of leading table-making R packages, with links to their respective project pages:

knitr (GITHUBWEBSITE) — kableExtra (GITHUBWEBSITE) — formattable (GITHUBWEBSITE) — DT (GITHUBWEBSITE) — pander (GITHUBWEBSITE) — huxtable (GITHUBWEBSITE) — reactable (GITHUBWEBSITE) — flextable (GITHUBWEBSITE) — ftextra (GITHUBWEBSITE) — pixiedust (GITHUB) — tangram (GITHUB) — ztable (GITHUB) — condformat (GITHUB) — stargazer (CRAN) — xtable (CRAN)

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct.
By participating in this project you agree to abide by its terms.

License

MIT © RStudio, PBC

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].