View source: R/fmt_pct_extra.R
| fmt_pct_extra | R Documentation |
Convert to percent and show less than 1% as <1% in grey
fmt_pct_extra(gt_object, columns, ..., scale = 1)
gt_object |
An existing gt table |
columns |
The columns to affect |
... |
Additional argument passed to |
scale |
A number to multiply values by, defaults to 1 |
a gt table
Other Utilities:
add_text_img(),
fa_icon_repeat(),
fmt_pad_num(),
fmt_symbol_first(),
generate_df(),
gt_add_divider(),
gt_badge(),
gt_double_table(),
gt_duplicate_column(),
gt_fa_rank_change(),
gt_fa_rating(),
gt_highlight_cols(),
gt_highlight_rows(),
gt_img_border(),
gt_img_circle(),
gt_img_multi_rows(),
gt_img_rows(),
gt_index(),
gt_merge_stack(),
gt_merge_stack_color(),
gt_two_column_layout(),
gtsave_extra(),
img_header(),
pad_fn(),
tab_style_by_grp()
library(gt)
pct_tab <- dplyr::tibble(x = c(.001, .05, .008, .1, .2, .5, .9)) %>%
gt::gt() %>%
fmt_pct_extra(x, scale = 100, accuracy = .1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.