format_num | R Documentation |
Formats numbers with thousand delimited commas. Values of less than 10 are represented as words by default.
format_num(number, less_than_10_as_words = TRUE)
number |
A number. |
less_than_10_as_words |
A logical determining whether values less than 10 are represented as words. |
A character object.
format_num("1000") # returns "1,000"
format_num("1") # returns 'one'
format_num("7", less_than_10_as_words = FALSE) # returns "7"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.