c_qty: Concatenate quantities

View source: R/quantities.R

c_qtyR Documentation

Concatenate quantities

Description

Concatenate multiple quantity vectors or values. They must all be of the same type (i.e. you cannot combine e.g. a temperature and a mass value). The concatenated values will be scaled according to best_metric. Note that the regular 'c()' operator automatically calls this function if the first argument is a quantity object.

Usage

c_qty(...)

Arguments

...

quantities to concatenate

Examples

c_qty(qty(5, "g"), qty(c(10, 20), "mg")) # MediaChemToolsMass [mg]: 5000, 10, 20
c(qty(5, "g"), qty(c(10, 20), "mg")) # same (shortcut for the above)

sebkopf/chemtools documentation built on Aug. 1, 2023, 2:36 a.m.