pretty_num | R Documentation |
Use pretty_num()
to format numbers compute_num()
is the underlying
engine that may be useful for custom formatting.
pretty_num(number, style = c("default", "nopad", "6"))
compute_num(number, smallest_prefix = "y")
number |
Numeric vector, number related to a linear quantity. |
style |
Formatting style:
|
smallest_prefix |
A character scalar, the smallest prefix to use. |
Character vector, the formatted sizes.
For compute_num
, a data frame with columns amount
, prefix
,
negative
.
numbers <- c(1337, 1.3333e-5, 13333337, 1333333337, 133333333337)
pretty_num(numbers)
pretty_num(numbers, style = "nopad")
pretty_num(numbers, style = "6")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.