Add the cols_merge_n_pct() function#683
Merged
rich-iannone merged 17 commits intomasterfrom Nov 18, 2020
Merged
Conversation
jcheng5
reviewed
Nov 16, 2020
jcheng5
reviewed
Nov 16, 2020
jcheng5
approved these changes
Nov 18, 2020
rich-iannone
added a commit
that referenced
this pull request
Dec 10, 2020
* master: do html_preserve hack for caption only when html_preserve is active Add tests; process_text now handles htmltools::tags, tagList Get table caption rewriting working for bookdown Update render_as_html.R Add the `create_caption_component_h()` fn Update helper-gt_attr_expectations.R Create TODOs and basics caption in HTML tables Update gt.Rd Augment the `dt_options_tbl` with `table_caption` Add `caption` arg in `gt()` Add the `caption` arg to `gt()` Add the `cols_merge_n_pct()` function (#683)
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 PR adds the
cols_merge_n_pct()function, which merges two columns together: a count column and a percentage column. This function will autohide thecol_pctcolumn by default (but that can be changed by settingautohide = FALSE). Different combinations ofNAare given special consideration much likecol_vals_uncert()function. Any zero values in thecol_ncolumn will be formatted solely as0.Fixes: #651