comma_cl | R Documentation |
Local version of scales::comma scales::percent
comma_cl( x, accuracy = NULL, scale = 1, prefix = "", suffix = "", big.mark = ".", decimal.mark = ",", trim = TRUE, digits, ... ) percent_cl( x, accuracy = NULL, scale = 100, prefix = "", suffix = "%", big.mark = ".", decimal.mark = ",", trim = TRUE, ... ) dollar_cl( x, accuracy = NULL, scale = 1, prefix = "$", suffix = "", big.mark = ".", decimal.mark = ",", trim = TRUE, largest_with_cents = 1e+05, negative_parens = FALSE, ... )
x |
A numeric vector to format. |
accuracy |
NULL |
scale |
1 |
prefix |
"" |
suffix |
"" |
big.mark |
"." |
decimal.mark |
"," |
trim |
TRUE |
digits |
digits |
... |
Other arguments passed on to base::format(). |
largest_with_cents |
largest_with_cents |
negative_parens |
negative_parens |
x <- 10^c(1:10) comma_cl(x) comma_cl(x + .123, accuracy = 0.001) comma_cl(x + .123, accuracy = 0.001, big.mark = " ") scales::comma(x) y <- runif(10) percent_cl(y) dollar_cl(x) dollar_cl(x + .123, accuracy = 0.001) dollar_cl(x + .123, accuracy = 0.0001, largest_with_cents = Inf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.