conconv: concentration unit conversion

View source: R/toolbox.R

conconvR Documentation

concentration unit conversion

Description

Converts from percentage oxide by weight to parts per million of the element and vice versa. wtpct2ppm and ppm2wtpct are special cases.

Usage

conconv(x, oxide, wtpct2ppm = TRUE)

wtpct2ppm(x, oxide)

ppm2wtpct(x, oxide)

Arguments

x

scalar or vector of wt% or ppm values

oxide

Oxide of the element; one of 'SiO2', 'TiO2', 'Al2O3', 'Fe2O3', 'FeO', 'CaO', 'MgO', 'MnO', 'K2O', 'Na2O', 'P2O5', 'Y2O3', 'ZrO2'

wtpct2ppm

logical. If TRUE, converts wt% to ppm, otherwise converts ppm to wt%.

Value

converted values

Examples

ppm <- wtpct2ppm(0.308,'TiO2')
wtpct <- ppm2wtpct(ppm,'TiO2')
ppm <- wtpct2ppm(0.308,'TiO2')
wtpct <- ppm2wtpct(ppm,'TiO2')

pvermees/GeoplotR documentation built on Aug. 20, 2024, 4:45 a.m.