Skip to content

Commit

Permalink
v0.3.1 Release Candidate (#821)
Browse files Browse the repository at this point in the history
* Increment version number

* Update NEWS.md

* Update .Rbuildignore

* Run examples only interactively

* Update .Rbuildignore

* Modify README
  • Loading branch information
rich-iannone authored Aug 9, 2021
1 parent bc28dde commit df86e0c
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
^README\.Rmd$
^README\.md$
^LICENSE\.md$
tests/gt-examples
vignettes
man/figures/.*svg$
man/figures/[^m].*png$
tests/gt-examples
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Type: Package
Package: gt
Version: 0.3.0.9000
Version: 0.3.1
Title: Easily Create Presentation-Ready Display Tables
Description: Build display tables from tabular data with an easy-to-use set of
functions. With its progressive approach, we can construct display tables
Expand Down
32 changes: 31 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
# gt (development version)
# gt 0.3.1

## New features

* We now have the `force_sign` argument in several numeric formatting functions (`fmt_number()`, `fmt_integer()`, `fmt_scientific()`, `fmt_engineering()`, `fmt_percent()`, `fmt_currency()`, and `fmt_bytes()`). This makes it possible to force the appearance of the positive sign for positive values (#773). (#793)

* It's now possible to add padding to the column labels and heading locations in HTML tables with two new arguments added to `tab_options()`: `column_labels.padding` and `heading.padding`. Several options already exist for easily changing the vertical padding of certain locations, so, these additions make it possible to fully alter to the padding from top to bottom (without resorting to using CSS) (#770). (#795)

* The `whitespace` argument has been added to `cell_text()` and this provides many options for making whitespace easier to handle in HTML output tables (#714). (#797)

## Minor improvements and bug fixes

* Fixed LaTeX rendering for tables that have a stub; now data row cells are correctly laid out.

* LaTeX output tables now properly render summary rows. In addition, grand summary rows are now rendered in LaTeX outputs (previously, grand summary rows were ignored). This clears the long-standing issue in #625. (#768)

* Titles and optional subtitles in LaTeX output tables have an improved appearance, and the underlying code was rewritten to guard against more edge cases that might lead to failing LaTeX output. (#779)

* The `data` argument in the `cols_label()` and `cols_width()` functions was renamed to `.data` to avoid a partial matching issue (raised in #715). (#772)

* Fixed a bug where styles may not be applied correctly to summary row cells in HTML output tables (#752). (#782)

* Incorporated the full use of X11 color names for styling HTML tables. Now, named colors like `gray50` won't throw an error. Additionally, CSS3 colors that have no equivalent in X11 (like `Crimson` and `RebeccaPurple`) will now also just work (#712). (#787)

* Fixed a bug that occurs in the following rare circumstance: when using `summary_rows()` with no stub, a new column is generated internally and given the name rowname; but this can conflict with a column that has the same name, generating duplicate column names and not erroring at that instant (#749). (#792)

* The image generation functions `local_image()` and `web_image()` are enhanced such that multiple image paths/URLs can now be handled without errors. Thanks, @primaj for the initial work on this in #738. Fixes #510. (#803)

* Fixed a bug that occurs when using a `font` with the `cell_text()` along with other styles. Fixes #661 and #802. (#805)

* Implemented a fix for the situation where `tab_style()` is used along with `cells_summary()` as a location and, also, `row_group_order()` is used to reorder row groups. This resulted in a non-application of the style to the targeted summary cells (#812). (#814)

# gt 0.3.0

Expand Down
12 changes: 12 additions & 0 deletions R/export.R
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ gtsave_filename <- function(path, filename) {
#' clients over using CSS in a `<style>` block.
#'
#' @examples
#' if (interactive()) {
#'
#' # Use `gtcars` to create a gt table;
#' # add a header and then export as
#' # HTML code with CSS inlined
Expand All @@ -320,6 +322,8 @@ gtsave_filename <- function(path, filename) {
#' substr(1, 700) %>%
#' cat()
#'
#' }
#'
#' @family Export Functions
#' @section Function ID:
#' 13-2
Expand Down Expand Up @@ -362,6 +366,8 @@ as_raw_html <- function(data,
#' @param data A table object that is created using the [gt()] function.
#'
#' @examples
#' if (interactive()) {
#'
#' # Use `gtcars` to create a gt table;
#' # add a header and then export as
#' # an object with LaTeX code
Expand All @@ -386,6 +392,8 @@ as_raw_html <- function(data,
#' as.character() %>%
#' cat()
#'
#' }
#'
#' @family Export Functions
#' @section Function ID:
#' 13-3
Expand Down Expand Up @@ -458,6 +466,8 @@ as_latex <- function(data) {
#' or `"header"`. By default, page numbering is not active (`"none"`).
#'
#' @examples
#' if (interactive()) {
#'
#' # Use `gtcars` to create a gt table;
#' # add a header and then export as
#' # RTF code
Expand All @@ -472,6 +482,8 @@ as_latex <- function(data) {
#' ) %>%
#' as_rtf()
#'
#' }
#'
#' @family Export Functions
#' @section Function ID:
#' 13-4
Expand Down
15 changes: 5 additions & 10 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ knitr::opts_chunk$set(
# gt <img src="man/figures/logo.svg" align="right" height="250px" />

<!-- badges: start -->
[![Lifecycle:
maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![CRAN
status](https://www.r-pkg.org/badges/version/gt)](https://cran.r-project.org/package=gt)
[![R build
Expand All @@ -30,7 +28,7 @@ With the **gt** package, anyone can make wonderful-looking tables using the **R*

<p align="center"><img src="man/figures/gt_parts_of_a_table.svg" width="800px"></p>

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.
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.

<p align="center"><img src="man/figures/gt_workflow_diagram.svg" width="800px"></p>

Expand All @@ -53,7 +51,7 @@ sp500 %>%
gt() %>%
tab_header(
title = "S&P 500",
subtitle = glue::glue("{start_date} to {end_date}")
subtitle = glue("{start_date} to {end_date}")
) %>%
fmt_date(
columns = date,
Expand Down Expand Up @@ -107,9 +105,9 @@ The **gt** package joins a burgeoning collection of packages for display table g
- 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
- multiple output formats are supported with the same declarative interface
- the API closely follows tidyverse conventions by adhering to the [tidyverse style guide](https://style.tidyverse.org)
- a focus on making the package documentation and examples the best they can be
- there's 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 other leading table-making **R** packages, with links to their respective project pages:
Expand All @@ -132,10 +130,7 @@ While **gt** is trying to do something different with its own interface, it may

#### Code of Conduct

Please note that the gt project is released with a [contributor
code of
conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/).<br>By
participating in this project you agree to abide by its terms.
Please note that the gt project is released with a [contributor code of conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/).<br>By participating in this project you agree to abide by its terms.

#### 📄 License

Expand Down
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

<!-- badges: start -->

[![Lifecycle:
maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![CRAN
status](https://www.r-pkg.org/badges/version/gt)](https://cran.r-project.org/package=gt)
[![R build
Expand All @@ -25,13 +23,12 @@ These include the *table header*, the *stub*, the *column labels* and
<img src="man/figures/gt_parts_of_a_table.svg" width="800px">
</p>

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.
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.

<p align="center">
<img src="man/figures/gt_workflow_diagram.svg" width="800px">
Expand Down Expand Up @@ -59,7 +56,7 @@ sp500 %>%
gt() %>%
tab_header(
title = "S&P 500",
subtitle = glue::glue("{start_date} to {end_date}")
subtitle = glue("{start_date} to {end_date}")
) %>%
fmt_date(
columns = date,
Expand Down Expand Up @@ -128,12 +125,12 @@ contributes to this ecosystem:
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
- multiple output formats are supported with the same declarative
interface
- the API closely follows tidyverse conventions by adhering to the
[tidyverse style guide](https://style.tidyverse.org)
- a focus on making the package documentation and examples the best
they can be
- there’s 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)
Expand Down Expand Up @@ -161,8 +158,7 @@ pages:

#### Code of Conduct

Please note that the gt project is released with a [contributor
code of
Please note that the gt project is released with a [contributor code of
conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/).<br>By
participating in this project you agree to abide by its terms.

Expand Down
4 changes: 4 additions & 0 deletions man/as_latex.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions man/as_raw_html.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions man/as_rtf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit df86e0c

Please sign in to comment.