containsElements: Check if one formula is contained in another

View source: R/chemFormula.R

containsElementsR Documentation

Check if one formula is contained in another

Description

containsElements checks if one sum formula is contained in another.

Usage

containsElements(x, y)

Arguments

x

character strings with a chemical formula

y

character strings with a chemical formula that shall be contained in x

Value

logical TRUE if y is contained in x

Author(s)

Michael Witting and Sebastian Gibb

Examples


containsElements("C6H12O6", "H2O")
containsElements("C6H12O6", "NH3")

rformassspectrometry/MetaboCoreUtils documentation built on Oct. 2, 2024, 5:13 a.m.