unit.scale: Unit scale from SI prefix

View source: R/units.R

unit.scaleR Documentation

Unit scale from SI prefix

Description

This function reads a prefix from a string and returns the exponent (base-10) that this prefix represents.

Usage

unit.scale(prefix)

Arguments

prefix

a string, e.g.: "M", "mega", "m", "milli", "µ", "micro", etc.

Value

an integer that corresponds to the prefix, defaults to 0.

Examples

> unit.scale("M")
[1] 6
> unit.scale("µ")
[1] -6

a-kramer/SBtabVFGEN documentation built on Dec. 15, 2024, 1:52 a.m.