Style numbers
Style numbers
style_number( x, digits = 0, big.mark = NULL, decimal.mark = NULL, scale = 1, ... )
x |
Numeric vector |
digits |
Integer or vector of integers specifying the number of digits
to round |
big.mark |
Character used between every 3 digits to separate
hundreds/thousands/millions/etc.
Default is |
decimal.mark |
The character to be used to indicate the numeric decimal point.
Default is |
scale |
A scaling factor: x will be multiplied by scale before formatting. |
... |
Other arguments passed on to |
formatted character vector
Other style tools:
style_percent()
,
style_pvalue()
,
style_ratio()
,
style_sigfig()
c(0.111, 12.3) %>% style_number(digits = 1) c(0.111, 12.3) %>% style_number(digits = c(1, 0))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.