format_currency | R Documentation |
Formats a number into a currency string
format_currency(amount, currency = c("EUR", "GBP"),
number_decimals = 2, scale = c("normal", "k", "M"))
amount |
The number you want to format as euros |
currency |
The currency symbol that should be used as a prefix |
number_decimals |
The largest number that should still be formatted using cents |
scale |
Used when you want to format the number in scales (regular, per thousands or millions) |
A string containing the euro formatted number
format_currency(amount = 1000000, currency = "EUR", number_decimals = 1,scale = "M")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.