units_without_zero.Rd
Convenience wrapper on useful unit_format
function offered within scales
package. Useful when producing scales
without 0: "" "1K" "10K"
instead of "0k" "1K" "10K"
.
units_without_zero(x, ...)
x | A numeric vector |
---|---|
... | other arguments passed to |
A character vector.
#> [1] "" "1K" "1 000K"# "0" "1K" "1,000K" # For comparison scales::unit_format(unit = "K", scale = 1e-3, sep = "")(vec_tst)#> [1] "0.0K" "1.0K" "1 000.0K"# [1] "0K" "1K" "1,000K"