num_currency | R Documentation |
Formats numbers with a thousand separator and a currency indicator.
num_currency(
x,
symbol = "$",
digits = 2L,
format = "f",
big.mark = ",",
...,
sep = ""
)
parse_currency(
x,
symbol = get_currency_symbol(x),
digits = max(get_digits(x)),
format = "f",
big.mark = ",",
...
)
x |
a numeric vector. |
symbol |
currency symbol |
digits |
an integer to indicate the number of digits of the percentage string. |
format |
format type passed to |
big.mark |
thousands separator |
... |
additional parameters passed to |
sep |
separator between symbol and value |
Other numeric vectors:
num_accounting()
,
num_comma()
,
num_digits()
,
num_percent()
,
num_scientific()
num_currency(200000)
num_currency(200000, "\U20AC")
num_currency(1200000, "USD", sep = " ")
num_currency(1200000, "USD", format = "d", sep = " ")
parse_currency("$ 120,250.50")
parse_currency("HK$ 120,250.50", symbol = "HK$")
parse_currency("HK$ 120, 250.50")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.