Generates a function that formats numeric values as percentage strings with optional digits, spacing, and multiplication by 100.
Examples
# Create a formatter with default settings
formatter <- fmt_percent()
formatter(0.75) # "75 %"
#> [1] "75 %"
# Create a formatter with 2 decimal places
formatter2 <- fmt_percent(digits = 2)
formatter2(0.12345) # "12.35 %"
#> [1] "12.35 %"
# Create a formatter without space before the percent sign
formatter3 <- fmt_percent(space = FALSE)
formatter3(0.5) # "50%"
#> [1] "50%"