comma_signif {ssdtools} | R Documentation |
Comma and Significance Formatter
Description
By default the numeric vectors are first rounded to three significant figures. Then scales::comma is only applied to values greater than or equal to 1000 to ensure that labels are permitted to have different numbers of decimal places.
Usage
comma_signif(x, digits = 3, ...)
Arguments
x |
A numeric vector to format. |
digits |
A whole number specifying the number of significant figures |
... |
Additional arguments passed to scales::comma. |
Value
A character vector.
Examples
comma_signif(c(0.1, 1, 10, 1000))
scales::comma(c(0.1, 1, 10, 1000))
[Package ssdtools version 1.0.6 Index]