Skip to contents

get_chemvalue() retrieves the ... FIXME

Usage

get_chemvalue(x, units)

get_cv(x, units)

Arguments

x

a chemunits vector

units

the units

Value

A double vector

Details

The alternative drop_units() (as well as the base function as.numeric()) simply returns the numeric value and drops the units. It can be useful in calculations but without specifying the output units like get_chemvalue() requires, it does not communicate intent as clearly and can lead to accidental mistakes such as not realizing what units a number has or dropping the units from an auto-scaling unit without realizing what SI prefix the unit has. The primary use of drop_units() is in data frames/tibbles where it can drop the units of all columns at once.

Functions

  • get_cv(): short-form for the get_chemvalue function