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()
#> [1] "0.1" "12.3"#> [1] "0.1" "12"