unitFromString {oce} | R Documentation |
Decode Units From Strings
Description
This is mainly intended for internal use within the package, e.g. by
read.odf()
, and so the list of string-to-unit mappings is not
documented, since developers can learn it from simple examination
of the code. The focus of unitFromString()
is on strings that are
found in oceanographic files available to the author, not on all
possible units.
Usage
unitFromString(unit, scale = NULL)
Arguments
unit |
a character value indicating the unit. These are matched according to rules developed to work with actual data files, and so the list is not by any means exhaustive. |
scale |
a character value indicating the scale. The default value
of |
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("dbar") # dbar (no scale)
unitFromString("deg c") # modern temperature (ITS-90 scale)