scale_si_unit: Scale format to International System of Units (k, M, )

Description Usage Arguments Value Examples

View source: R/ggplot_functions.R

Description

Format a vector of numeric values according to the International System of Units.

(ie: 1,000 becomes "1 k", 2,500 becomes "2.5 k") See: http://en.wikipedia.org/wiki/SI_prefix

Usage

1
scale_si_unit(sep = " ", ...)

Arguments

sep

Seperator to use between number and unit (defaults to " ")

...

Passed by ggplot2::scale_*_continuous

Value

Used with scale_*_continuous, returns formatted axis labels

Examples

1
2
3
4
## Not run: 
ggplot(diamonds, aes(x = price)) + geom_density() + scale_x_continuous(labels = scale_si_unit())

## End(Not run)

Sorenson-Impact/sorensonimpact documentation built on Nov. 6, 2021, 4:25 a.m.