View source: R/elco_elco_convert.R
elco_elco_convert | R Documentation |
elco
.elco_elco_convert
takes an object of class elco
and converts it measurement unit to
a specified unit.
elco_elco_convert(x, to, sample_mass = NULL)
x |
An object of class |
to |
A character value representing the unit of measurement to which the element contents should be transformed. This can be any combinations of masses and molar amounts (e.g. "g", "mol", "g/g", "mol/g"). |
sample_mass |
Optionally. A numeric vector of class |
x
with converted element contents.
elco_elco_convert(elco::chno$C, to = "mol/g") # unit conversion where specifying the sample mass is needed library(quantities) elco_elco_convert( elco::chno$C, to = "mol", sample_mass = quantities::set_quantities(1, "g", errors = 0) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.