Set or retrieve measurement units to/from numeric vectors and convert units
(extensions to the units package for quantities and
errors objects).
# S3 method for quantities
units(x) <- value# S3 method for errors
units(x) <- value
# S3 method for quantities
set_units(x, value, ...,
mode = units_options("set_units_mode"))
# S3 method for errors
set_units(x, value, ...,
mode = units_options("set_units_mode"))
# S3 method for quantities
mixed_units(x, values, ...)
# S3 method for errors
mixed_units(x, values, ...)
numeric vector, or object of class units
object of class units or symbolic_units, or in the case of set_units expression with symbols that can be resolved in ud_units (see examples).
passed on to as_units
if "symbols" (the default), then unit is constructed from
the expression supplied. Otherwise, ifmode = "standard",
standard evaluation is used for the supplied value This argument can be set
via a global option units_options(set_units_mode = "standard")
character vector with units encodings, or list with symbolic units of class mixed_symbolic_units