View source: R/formatting_helpers.R
| format_currency | R Documentation |
Format currency values with appropriate suffixes
format_currency(val, digits = 2)
val |
Numeric value to format as currency |
digits |
Number of digits after decimal for millions/billions (default: 2) |
Formatted currency string
format_currency(1234567) # "$1.23M"
format_currency(1234567890) # "$1.23B"
format_currency(123) # "$123"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.