View source: R/formatting_helpers.R
| format_percent | R Documentation |
Format percentages
format_percent(val, digits = 1)
val |
Numeric value to format as percentage (0-100 scale) |
digits |
Number of decimal places (default: 1) |
Formatted percentage string
format_percent(23.456) # "23.5%"
format_percent(0.234, digits = 2) # "0.23%"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.