Skip to contents

Modify unit abbreviation, vectorized version

Usage

unit_modify_vec(x, unit, outtype, magnitude = magnitude_order(x))

Arguments

x

num The maximum number in the dataset

unit

chr Type of units, supported values are: AF, F, $, W, MW

outtype

chr The type of output to be added. Current possibilities are: begin, end, abbrev, unit_eng

magnitude

num The order of magnitude for the unit. The highest triplet will be used. See magnitude_triplet

Value

chr updated units

See also

Examples

unit_modify(10^7, "AF", "abbrev")
#> [1] "MAF"