The labels generated represent numbers rescaled to compensate for a change in unit's by a factor of ten or by a power of ten.
Arguments
- exponent
numeric Power of 10 to use as multiplier
- digits
number of significant digits to show
- ...
other arguments passed on to
format
- x
a numeric vector to format
Examples
SI_pl_format()(1:10)
#> [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10"
SI_pl_format()(runif(10))
#> [1] "0.4800" "0.9200" "0.4010" "0.2130" "0.6720" "0.0586" "0.9970" "0.1490"
#> [9] "0.5190" "0.8460"
SI_pl_format(exponent = 2)(runif(10))
#> [1] "0.00718" "0.00241" "0.00547" "0.00835" "0.00028" "0.00469" "0.00806"
#> [8] "0.00814" "0.00404" "0.00218"
SI_plain(1:10)
#> [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10"
SI_plain(runif(10))
#> [1] "0.4180" "0.6690" "0.5080" "0.6600" "0.5120" "0.8360" "0.7090" "0.8740"
#> [9] "0.0115" "0.8880"
SI_plain(runif(10), digits = 2)
#> [1] "1.00" "0.50" "0.36" "0.77" "0.58" "0.63" "0.86" "0.57" "0.25" "0.92"