Description Usage Arguments Details Value Examples
The true minus sign (Unicode 2212) – neither an em dash, nor an en dash, nor the usual hyphen-minus – is highly underrated. It makes everything look better!
| 1 2 3 4 5 6 7 8 | 
| x | Numeric vector. | 
| ... | Other arguments passed on to  | 
| format | Any function that takes a numeric vector
and returns a character vector,
such as  | 
| add_plusses | Logical. Should positive values have plus signs? | 
| trim_leading_zeros | Logical. Should  | 
| label_at_zero | Character. What should be returned
when  | 
add_plusses, trim_leading_zeros, and label_at_zero
are offered for convenience.
The options signs.format, signs.add.plusses,
signs.trim.leading.zeros, and signs.label.at.zero
are set when the package is loaded
to scales::number, FALSE, FALSE, and "none",
respectively.
If the package is not loaded and the these options are not otherwise set,
signs will use those defaults.
label_at_zero is applied after format;
that is, if it is "blank"
and you've specified an accuracy of 0.1,
-0.04 will show as blank.
A UTF-8 character vector
| 1 2 3 4 5 6 7 8 | x <- seq(-5, 5)
scales::number(x)
signs(x)
signs(x, accuracy = 1, scale = 1, format = scales::percent)
signs(x, add_plusses = TRUE)
signs(x, add_plusses = TRUE, label_at_zero = "blank")
signs(x, add_plusses = TRUE, label_at_zero = "symbol")
signs(x, accuracy = .1, scale = .1, trim_leading_zeros = TRUE)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.