Skip to content

Commit

Permalink
Update checks.R
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrescino committed Mar 7, 2024
1 parent 26b083b commit fd7c97e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/checks.R
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ check.logic <- function(x, statement, filternm=NULL, stopifnull=FALSE,
}
chklogicchar <- logic.chars[sapply(logic.chars,
function(x, part){ grepl(x, part, ignore.case=TRUE) }, part)]

if (length(chklogicchar) > 1) {
if (length(chklogicchar) == 2 && all(c("notin", "in") %in% chklogicchar)) {
chklogicchar <- "notin"
Expand All @@ -183,6 +183,8 @@ check.logic <- function(x, statement, filternm=NULL, stopifnull=FALSE,
chklogicchar <- "<="
} else if (length(chklogicchar) == 2 && all(c(">=", ">") %in% chklogicchar)) {
chklogicchar <- ">="
} else if (length(chklogicchar) == 2 && all(c("<", ">") %in% chklogicchar)) {
chklogicchar <- "<>"
} else {
stop("more than one logic char: ", toString(chklogicchar))
}
Expand Down

0 comments on commit fd7c97e

Please sign in to comment.