is.subformula: is.subformula.

Description Usage Arguments Details Value Examples

View source: R/is.subformula.R

Description

is.subformula will test for all elements of one chemical formula (f_sub) to be present in another (f_main).

Usage

1
is.subformula(f_sub, f_main, substitutions = NULL)

Arguments

f_sub

Supposed chemical sub formula.

f_main

Supposed chemical main formula.

substitutions

dataframe of allowed substitutions to consider.

Details

To achieve the task formulas are split into elements and counted using CountChemicalElements.

Value

Logical indicating if f_sub is potentially a subformula of f_main.

Examples

1
2
InterpretMSSpectrum:::is.subformula(f_sub="C6H12O6", f_main="C6H12O6")
InterpretMSSpectrum:::is.subformula(f_sub="C4H8O5", f_main="C6H12O6")

InterpretMSSpectrum documentation built on May 3, 2018, 5:04 p.m.