Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/formulaCalculator.R
Add, subtract, and multiply molecular formulas.
1 2 | add.formula(f1, f2, as.formula = TRUE, as.list = FALSE)
multiply.formula(f1, n, as.formula = TRUE, as.list = FALSE)
|
f1, f2 |
Molecular formulas (in list form or in text form) to calculate with. |
as.formula |
Return the result as a text formula (e.g.
|
as.list |
Return the result in list format (e.g. |
n |
Multiplier (positive or negative, integer or non-integer.) |
Note that the results are not checked for plausibility at any stage, nor reordered.
The resulting formula, as specified above.
Michael Stravs
formulastring.to.list
, is.valid.formula
,
order.formula
1 2 3 4 5 | ##
add.formula("C6H12O6", "C3H3")
add.formula("C6H12O6", "C-3H-3")
add.formula("C6H12O6", multiply.formula("C3H3", -1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.