Make a select rows node.

select_rows_se(source, expr, env = parent.frame())

Arguments

source

source to select from.

expr

expression to select rows.

env

environment to look for values in.

Value

select rows node.

Examples

if (requireNamespace("DBI", quietly = TRUE) && requireNamespace("RSQLite", quietly = TRUE)) { my_db <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") d <- rq_copy_to(my_db, 'd', data.frame(AUC = 0.6, R2 = 0.2)) optree <- select_rows_se(d, "AUC >= 0.5") cat(format(optree)) sql <- to_sql(optree, my_db) cat(sql) print(DBI::dbGetQuery(my_db, sql)) DBI::dbDisconnect(my_db) }
#> mk_td("d", c( #> "AUC", #> "R2")) %.>% #> select_rows(., #> AUC >= 0.5) #> SELECT * FROM ( #> SELECT #> `AUC`, #> `R2` #> FROM #> `d` #> ) tsql_41710034995783897713_0000000000 #> WHERE `AUC` >= 0.5 #> AUC R2 #> 1 0.6 0.2