Add options for sig figs / inclusion of trailing dec marks#546
Merged
rich-iannone merged 10 commits intomasterfrom Jun 22, 2020
Merged
Add options for sig figs / inclusion of trailing dec marks#546rich-iannone merged 10 commits intomasterfrom
rich-iannone merged 10 commits intomasterfrom
Conversation
jcheng5
reviewed
Apr 24, 2020
jcheng5
reviewed
Apr 24, 2020
Also, update tests for significant figures formatting.
jcheng5
previously approved these changes
Apr 27, 2020
jcheng5
previously approved these changes
Apr 29, 2020
* master: Fix issues with defining column widths in `cols_width()` (#561) Add `scale_values` arg to `fmt_percent()` (#565) Restore row striping option in stub cells (`row.striping.include_stub = TRUE`) (#564) Refactor `data_color()` so that it executes faster (#576) Update R-CMD-check.yaml (#599) Release gt 0.2.1 (#588) Ensure that row ordering doesn't affect summary row calculations (#556) Update failing example (#586) Remove test of scales behaviour Squelch warnings from tibble 3.0.0/3.0.1 (#557) Bump cache on pkgdown.yaml for GH workflow (#570) Update GH Actions workflow for R CMD check (#568) Update Description of package to be less confusing (#569)
jcheng5
approved these changes
Jun 22, 2020
rich-iannone
added a commit
that referenced
this pull request
Oct 13, 2020
* master: Rewrite of RTF building functions and `as_rtf()` (#638) v0.2.2 Release Candidate (#629) Settable font options (#591) Add options for sig figs / inclusion of trailing dec marks (#546) Fix issues with defining column widths in `cols_width()` (#561) Add `scale_values` arg to `fmt_percent()` (#565) Restore row striping option in stub cells (`row.striping.include_stub = TRUE`) (#564) Refactor `data_color()` so that it executes faster (#576) Update R-CMD-check.yaml (#599) Release gt 0.2.1 (#588) Ensure that row ordering doesn't affect summary row calculations (#556)
rich-iannone
added a commit
that referenced
this pull request
Oct 25, 2020
* master: (30 commits) Spanner alignment correction (#662) PEN currency fix (#663) Fix for `gtsave()` when saving an image and specifying a `path` value (#592) Rewrite of RTF building functions and `as_rtf()` (#638) v0.2.2 Release Candidate (#629) Settable font options (#591) Add options for sig figs / inclusion of trailing dec marks (#546) Fix issues with defining column widths in `cols_width()` (#561) Add `scale_values` arg to `fmt_percent()` (#565) Restore row striping option in stub cells (`row.striping.include_stub = TRUE`) (#564) Refactor `data_color()` so that it executes faster (#576) Update R-CMD-check.yaml (#599) Release gt 0.2.1 (#588) Ensure that row ordering doesn't affect summary row calculations (#556) Update failing example (#586) Remove test of scales behaviour Squelch warnings from tibble 3.0.0/3.0.1 (#557) Bump cache on pkgdown.yaml for GH workflow (#570) Update GH Actions workflow for R CMD check (#568) Update Description of package to be less confusing (#569) ...
This file contains hidden or 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
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.
This adds the
n_sigfigarg to thefmt_number()function and thedrop_trailing_dec_markarg to thefmt_number(),fmt_percent(), andfmt_currency()functions.The significant figures method uses a combination of the
signif()andformatC()functions to ensure compliance with modern significant digit display rules.The option to retain a decimal mark (here, with
drop_trailing_dec_mark) is often seen in scientific literature and in statistical summary tables. Ifdrop_trailing_dec_markis changed from the default value, it displays the otherwise implicit decimal mark (even if there are no decimal figures required for display).Fixes: #535