convertMol_to_PPM: convertMol_to_PPM

View source: R/convertMol_to_PPM.R

convertMol_to_PPMR Documentation

convertMol_to_PPM

Description

Convert the elemental concentrations (relative to an internal standard) of a data frame from Mol/Mol to ppm/ppm

Usage

  convertMol_to_PPM(dat, AtomicMass, InternStand)

Arguments

dat

a data frame of elemental concentrations (relative to an internal standard) in Mol/Mol

AtomicMass

a matrix describing the atomic weight of the elements included in the session

InternStand

the name of the internal standard used in the calculation of the concentrations

Details

A matrix describing the atomic weight of the element is included in the present package (AtomicMass.csv). Note that convertMol_to_PPM() will convert the whole data frame uploaded except the first column that is usually dedicted to the time (transect mode) or to the names of the replicate (spot mode) according to runElementR() method.

See Also

convertingReplicate. convertPPM_to_Mol.

Examples

## Convert the file Example1_replicate1.csv included in the package from Mol/Mol into ppm/ppm

# indicate the path and read the file to be converted
filePath <- system.file("Example_conversion/Ex1/Example1_Replicate1.csv", package="elementR")

dat <- readData(filePath, sep = ",", dec = ".")

# indicate the path and read the file containing the atomic weight of the elements
AtomWeightPath <- system.file("AtomicMass.csv", package="elementR")

AtomicMass <- readData(AtomWeightPath, sep = ",", dec = ".")

# set the internal standard
InternStand <- "Ca43"

standard <- convertMol_to_PPM(dat, AtomicMass, InternStand)

## Display the converted data 
standard

charlottesirot/elementR documentation built on March 8, 2024, 5:13 a.m.