unit.id: Converts a unit to a string that works as an identifier

View source: R/units.R

unit.idR Documentation

Converts a unit to a string that works as an identifier

Description

Some formats require a name for a unit definition. This functions creates a name from a unit, converting math/symbols to text. The returned value should work as an SBML unit id.

Usage

unit.id(unit.str, prnt = FALSE)

Arguments

unit.str

the original string representastion of that unit

prnt

logical switch: if TRUE, the name will be printed.

Value

unit.id string

Examples

> unit.id("s^9")
[1] "s_to_the_power_of_9"

> unit.id("cm^2")
[1] "cm_square"

> unit.id("1/s")

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