units (version 0.7-2)

install_symbolic_unit: Define new symbolic units

Description

Adding a symbolic unit allows it to be used in as_units, make_units and set_units. No installation is performed if the unit is already known by udunits.

Usage

install_symbolic_unit(name, warn = TRUE, dimensionless = TRUE)

remove_symbolic_unit(name)

Arguments

name

a length 1 character vector that is the unit name or symbol.

warn

warns if the supplied unit symbol is already a valid unit symbol recognized by udunits.

dimensionless

logical; if TRUE, a new dimensionless unit is created, if FALSE a new base unit is created. Dimensionless units are convertible to other dimensionless units (such as rad), new base units are not convertible to other existing units.

Details

install_symbolic_unit installs a new dimensionless unit; these are directly compatible to any other dimensionless unit. To install a new unit that is a scaled or shifted version of an existing unit, use install_conversion_constant or install_conversion_offset directly.<U+00E7>