Learn R Programming

huxtable (version 5.1.1)

fmt_percent: Format numbers as percent

Description

Format numbers as percent

Usage

fmt_percent(digits = 1)

Arguments

digits

How many digits to print.

Value

An object you can pass into number_format().

See Also

Other format functions: fmt_pretty()

Examples

Run this code
# NOT RUN {
jams$Sugar <-c ("Sugar content",
      0.4, 0.35, 0.45)
set_number_format(jams, -1, "Sugar",
      fmt_percent(1))

# }

Run the code above in your browser using DataLab