Get the total formula after add adduct.

`sum_formula(formula = "C9H11NO2", adduct = "M-H2O+H")`

## Arguments

- formula
Chemical formula.

- adduct
Adduct.

## Examples

```
sum_formula(formula = "C9H11NO2", adduct = "M+H")
#> [1] "C9H12NO2"
sum_formula(formula = "C9H11NO2", adduct = "M+")
#> [1] "C9H11NO2"
sum_formula(formula = "C9H11NO2", adduct = "M+CH3COOH")
#> [1] "C11H15NO4"
sum_formula(formula = "C9H11", adduct = "M-H20")
#> [1] NA
```