Closed sgibb closed 11 months ago
BTW: with this PR #63 is easy to solve: containsElements
could return NA
/ FALSE
for invalid formulas (we just have to call suppressWarnings(countElements(y))
and return NA
/FALSE
if countElements
yield NA
)
This PR propose a solution to #64 .
I had to touch
.sum_elements
(change order of tests),calculateMass
(test forNULL
) andadductFormula
(drop invalid formulas silently) to keep the current behaviour (and pass all unit tests).Unfortunately we lose the position information (e.g. pos 3 contains "Fo").
BTW: I removed unnecessary
[
and]
in the regexp.