pretty_round | R Documentation |
Function to return numbers rounded for presentation purposes, with commas where appropriate.
pretty_round(x)
x |
Numeric vector to round |
Character vector of rounded numbers, with commas separating thousands and 'm' to denote millions.
Numbers below 1m are rounded to the nearest 100. Numbers >= 1m are rounded to the nearest 1,000.
pretty_round(c(10, 110, 10050, 20500, 2000100, 3445123))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.