Convert number to string Vectorized version
num2str_vec.RdConvert number to string Vectorized version
Usage
num2str_vec(
x,
sf = 2,
outtype = c("abbreviated", "with_suffix", "rounded"),
suffix_lb = "K"
)Arguments
- x
num- sf
numsignificant figures to round to- outtype
chrFormat of the outtypeabbreviatedtakes the formXXwhere X are digitswith_suffixtakes the formXXSwhere X are digits and S is the suffixroundedtakes the formXX.XXrounded withsfsig figs
See also
num2str
Other rounding:
magnitude_order(),
magnitude_triplet(),
num2str(),
num_chr_suffi,
round_to(),
size(),
unit_find(),
unit_modify(),
unit_modify_vec(),
unit_string()
Examples
num2str(10000)
#> [1] "10K"