Decode units, from strings

unitFromString(s)

Arguments

s

A string.

Value

A list() of two items: unit which is an expression(), and scale, which is a string.

See also

Other functions that interpret variable names and units from headers: ODFNames2oceNames(), cnvName2oceName(), oceNames2whpNames(), oceUnits2whpUnits(), unitFromStringRsk(), woceNames2oceNames(), woceUnit2oceUnit()

Examples

unitFromString("DB") # dbar
#> $unit #> expression(db) #> #> $scale #> [1] "" #>