Learn R Programming

IDSL.UFA (version 2.0)

monoisotopicMassCalculator: Monoisotopic Mass Calculator

Description

This function calculates monoisotopic mass of a molecular formula

Usage

monoisotopicMassCalculator(MoleFormVec, massAbundanceList,
LElements = length(massAbundanceList))

Value

The monoisotopic mass

Arguments

MoleFormVec

A numerical vector molecular formula

massAbundanceList

A list of isotopic mass and abundance of elements obtained from the `element_sorter` function

LElements

length of elements

Examples

Run this code
Elements <- c("C", "H", "O")
MoleFormVec <- c(2, 6, 1) # C2H6O
EL_mass_abundance <- element_sorter(ElementList = Elements, alphabeticalOrder = FALSE)
massAbundanceList <- EL_mass_abundance[["massAbundanceList"]]
MImass <- monoisotopicMassCalculator(MoleFormVec, massAbundanceList)

Run the code above in your browser using DataLab