unit.kind: find unit category

View source: R/units.R

unit.kindR Documentation

find unit category

Description

This function reads a unit, without SI prefix, and returns a string from a smaller subset of unit kinds, similar to what is defined in SBML. This normalizes the various ways to write the same unit: "meter", "m" and "metre".

Usage

unit.kind(kind)

Arguments

kind

the unnormalized string that humans use to write a unit (but without prefix)

Details

The unit kind of "m" is "metre", the kind of "g" is "gram".

Value

normalized category name of the unit kind: litre, mole, metre, kilogram, gram, ampere, candela, second, kelvin, hour, molarity, dimensionless. defaults to dimensionless.

Examples

>  unit.kind("meter")
[1] "metre"

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