Skip to contents

chemunits vector

Usage

set_chemunits(x, units, convert_to_preferred = FALSE, auto_scale = TRUE)

set_cu(x, units, convert_to_preferred = FALSE, auto_scale = TRUE)

Arguments

x

A numeric vector

units

units

convert_to_preferred

whether to convert to default (if there is default)

auto_scale

whether to auto-scale (if units are scalable)

Value

An S3 vector of class chemunits.

Functions

  • set_cu(): short-form for the set_chemunits function

Examples

set_chemunits(c(0.25, 0.5, 0.75))
#> ChemUnits: [1]
#> [1] 0.25 0.50 0.75