number | R Documentation |
This function is a low-level helper that powers many of the labelling functions. You should generally not need to call it directly unless you are creating your own labelling function.
number(
x,
accuracy = NULL,
scale = 1,
prefix = "",
suffix = "",
big.mark = " ",
decimal.mark = ".",
style_positive = c("none", "plus", "space"),
style_negative = c("hyphen", "minus", "parens"),
scale_cut = NULL,
trim = TRUE,
...
)
cut_short_scale(space = FALSE)
cut_long_scale(space = FALSE)
cut_time_scale(space = FALSE)
cut_si(unit)
accuracy |
A number to round to. Use (e.g.) Applied to rescaled data. |
scale |
A scaling factor: |
prefix |
Additional text to display before the number. The suffix is
applied to absolute value before |
suffix |
Additional text to display after the number. |
big.mark |
Character used between every 3 digits to separate thousands. |
decimal.mark |
The character to be used to indicate the numeric decimal point. |
style_positive |
A string that determines the style of positive numbers:
|
style_negative |
A string that determines the style of negative numbers:
|
scale_cut |
Named numeric vector that allows you to rescale large (or small) numbers and add a prefix. Built-in helpers include:
If you supply a vector |
trim |
Logical, if |
... |
Other arguments passed on to |
space |
Add a space before the scale suffix? |
unit |
SI unit abbreviation. |
A character vector of length(x)
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.