query <- queryGroup(
condition = "AND",
queryGroup(
queryRule(
field = "Species",
operator = "equal",
value = "setosa"
),
queryRule(
field = "Petal.Length",
operator = "less",
value = 1.2
)
)
)
queryToExpr(query)
dplyr::filter(iris, !!queryToExpr(query))
Run the code above in your browser using DataLab