Skip to content

Commit

Permalink
Update chemFormula.R, fixing rformassspectrometry#51
Browse files Browse the repository at this point in the history
  • Loading branch information
meowcat authored Feb 11, 2022
1 parent e3a622b commit 977b54e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/chemFormula.R
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ standardizeFormula <- function(x) {
#' containsElements("C6H12O6", "NH3")
containsElements <- function(x, y) {
mapply(
FUN = function(xx, yy)all(.sum_elements(c(xx, -yy)) > 0),
FUN = function(xx, yy)all(.sum_elements(c(xx, -yy)) >= 0),
xx = countElements(x), yy = countElements(y),
SIMPLIFY = TRUE, USE.NAMES = FALSE
)
Expand Down

0 comments on commit 977b54e

Please sign in to comment.