View source: R/label-number-si.R
| label_number_si | R Documentation |
label_number_si() is deprecated because the previous unit didn't actually
use SI units, but instead used the so called "short scale". You can now get the
same results as before with
label_number(scale_cut = cut_short_scale()), or if you want correct SI
units, label_number(scale_cut = cut_si("unit")).
label_number_si(unit = "", accuracy = NULL, scale = 1, suffix = "", ...)
unit |
Unit of measurement (e.g. |
accuracy |
A number to round to. Use (e.g.) Applied to rescaled data. |
scale |
A scaling factor: |
suffix |
Additional text to display after the number. |
... |
Arguments passed on to
|
All label_() functions return a "labelling" function, i.e. a function that
takes a vector x and returns a character vector of length(x) giving a
label for each input value.
Labelling functions are designed to be used with the labels argument of
ggplot2 scales. The examples demonstrate their use with x scales, but
they work similarly for all scales, including those that generate legends
rather than axes.
Other labels for continuous scales:
label_bytes(),
label_currency(),
label_glue(),
label_number_auto(),
label_ordinal(),
label_parse(),
label_percent(),
label_pvalue(),
label_scientific()
Other labels for log scales:
label_bytes(),
label_log(),
label_scientific()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.