units (version 0.6-7)

set_units: set_units

Description

A pipe friendly version of units<-

Usage

set_units(x, value, ..., mode = units_options("set_units_mode"))

Arguments

x

a numeric to be assigned units, or a units object to have units converted

value

a units object, or something coercible to one with as_units. Depending on mode, the unit is constructed from the supplied bare expression or from the supplied value via standard evaluation.

...

passed on to as_units

mode

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")

See Also

as_units