Unit Interpreter
unit.from.string.RdThis function will try its best to interpret strings like "liter/(nmol ms)" rules: 1. only one slash is allowed 2. M can be mega or mol/l: writing M for molarity will treat molarity as it's own unit kind; writing "molarity" will be translated into two SI units (mol and litre) 3. prefixes and units can be words or single letters 4. everything after a slash is the denominator 5. u is an accepted replacement for μ (unicode greek mu or unicode micro symbol) 6. no parentheses (ignored): "(m/s)*kg" will be misinterpreted
Arguments
- unit.str
a string that contains a human readable unit
- verbose
if TRUE, this function prints what it does (to find problems)
Value
data.frame with an interpretation of the unit (multiplier is unused here, but may be used later to deal with units such as hours (kind=second, multiplier=60)