listQueryOperators()
in_closed_range <- function(x, range) {
x >= range[1] & x <= range[2]
}
setQueryOperators(
"within" = queryOperator(in_closed_range),
"not_within" = queryOperator(!in_closed_range)
)
query <- queryGroup(
condition = "AND",
queryRule("am", "equal", 1),
queryRule("qsec", "within", c(10, 15)),
queryRule("disp", "not_within", c(10, 15))
)
queryToExpr(query)
Run the code above in your browser using DataLab