fmt_percent: Format numbers as percent

View source: R/number-format-functions.R

fmt_percentR Documentation

Format numbers as percent

Description

fmt_ functions are designed to work with number_format().

Usage

fmt_percent(digits = 1, format = "f", ...)

Arguments

digits

How many digits to print.

format, ...

Passed into formatC().

Value

An object you can pass into number_format().

See Also

Other format functions: fmt_pretty()

Examples


jams$Sugar <- c(
  "Sugar content",
  0.4, 0.35, 0.45
)
set_number_format(
  jams, -1, "Sugar",
  fmt_percent(1)
)


huxtable documentation built on Aug. 19, 2025, 1:12 a.m.