Skip to contents

Convert to percent and show less than 1% as <1% in grey

Usage

fmt_pct_extra(gt_object, columns, ..., scale = 1)

Arguments

gt_object

An existing gt table

columns

The columns to affect

...

Additional argument passed to scales::label_percent()

scale

A number to multiply values by, defaults to 1

Value

a gt table

Examples

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)