elco_elco_convert_df: Converts the unit of objects of class 'elco' in a...

View source: R/elco_elco_convert.R

elco_elco_convert_dfR Documentation

Converts the unit of objects of class elco in a data.frame.

Description

elco_elco_convert_df applies elco_elco_convert() to all columns of class elco in a specified data.frame

Usage

elco_elco_convert_df(x, to, sample_mass = NULL)

Arguments

x

A data.frame.

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 quantities::quantities() with tnrow(x) elements that contains the mass of the corresponding samples. This is used for all unit conversions that require the sample mass, for example to convert from a mass fraction [g/g] to molar amount [mol].

Value

x with converted element contents.


henningte/elco documentation built on May 21, 2022, 6:56 p.m.