set_units {units} | R Documentation

## 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, if`mode = "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`

[Package units version 0.6-2 Index]