addMolecules {Rdisop} | R Documentation |
Simple arithmetic modifications of sum formulae.
addMolecules(formula1, formula2, elements = NULL) subMolecules(formula1, formula2, elements = NULL)
formula1 |
Sum formula |
formula2 |
Sum formula |
elements |
list of allowed chemical elements, defaults to full periodic system of elements |
addMolecules() adds the second argument to the first. subMolecules() subtracts the second argument from the first.
This can be useful to revert e.g. adduct/fragment formation found in ESI mass spectrometry, or to mimick simple chemical reactions. No chemical checks are performed.
|
A list with the elements
|
Steffen Neumann <sneumann@IPB-Halle.DE>
# For proton-Adduct of Ethanol: subMolecules("C2H7O", "H")