Convert SI unit prefixes into exponents of ten of multipliers and vice-versa.
Usage
exponent2prefix(
exponent,
char.set = getOption("photobiology.fancy.chars", default = "utf8")
)
exponent2factor(exponent = 0, if.zero.exponent = "1")
exponent2prefix_name(exponent)
prefix_name2exponent(name)
prefix2exponent(
prefix,
char.set = getOption("photobiology.fancy.chars", default = "utf8")
)
has_SI_prefix(exponent)
nearest_SI_exponent(exponent)
Arguments
- exponent
numeric The power of 10 of the unit multiplier.
- char.set
character How to encode Greek letters and other fancy characters in prefixes:
"utf8"
,"ascii"
,"LaTeX"
. The difference between"utf8"
and"ascii"
is that the first uses UTF8 character "micro" (similar to Greek mu) and the second uses "u".- if.zero.exponent
character string to return when exponent is equal to zero.
- name
character Long SI name of multiplier.
- prefix
character Unit prefix used for multiplier.