New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow an empty table with zero rows to create an empty gt table #283
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* master: Adding the `currency()` helper function for specifying custom currencies (#281)
rich-iannone
changed the title
[WIP] Allow an empty table with zero rows to create an empty gt table
Allow an empty table with zero rows to create an empty gt table
Jul 16, 2019
schloerke
approved these changes
Jul 16, 2019
rich-iannone
added a commit
to batpigandme/gt
that referenced
this pull request
Nov 11, 2019
* master: (59 commits) add fmt_markdown to _pkgdown.yml (rstudio#371) Use `tidy_grepl()` instead of `expect_match()` Use `tidy_grepl()` & `expect_true()` Add `dt_*()` methods for all major, internal data structures (rstudio#355) Update CLA text (rstudio#373) remove reliance on Github version of sass, which is now updated on CRAN (rstudio#366) Fix for invisible top borders in rendered HTML tables (rstudio#359) CSS modifications (rstudio#346) Incorporate alpha option to `cell_fill()` (rstudio#340) Enable option to set row group padding in `tab_options()` (rstudio#342) Modify `filter()` statement (rstudio#341) Allow use of integers in `pct()`/`px()` (rstudio#336) Fix for resolving row group cells (rstudio#335) Easier access to footnote mark options (rstudio#333) Export `as.tags.gt_tbl()` (rstudio#331) Several `rlang`-based fixes (rstudio#334) Add function to specify column widths: `cols_widths()` (rstudio#293) Add `rstudio/sass` to Remotes list (rstudio#326) Fix for `cell_borders()` (rstudio#323) Allow an empty table with zero rows to create an empty gt table (rstudio#283) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If we use table data with 0 rows but some columns defined, we get an error (and it's not informative). Here's an example:
This PR considers that zero-row table to be valid input and so a rendered table with no rows will appear. Here is the output of the above statement with the changes here:
Fixes #87.