Modify unit abbreviation, vectorized version
unit_modify_vec.RdModify unit abbreviation, vectorized version
Usage
unit_modify_vec(x, unit, outtype, magnitude = magnitude_order(x))Arguments
- x
numThe maximum number in the dataset- unit
chrType of units, supported values are:AF, F, $, W, MW- outtype
chrThe type of output to be added. Current possibilities are:begin, end, abbrev, unit_eng- magnitude
numThe order of magnitude for the unit. The highest triplet will be used. Seemagnitude_triplet
See also
unit_modify
Other rounding:
magnitude_order(),
magnitude_triplet(),
num2str(),
num2str_vec(),
num_chr_suffi,
round_to(),
size(),
unit_find(),
unit_modify(),
unit_string()
Examples
unit_modify(10^7, "AF", "abbrev")
#> [1] "MAF"