Run the data query.
execute( source, optree, ..., limit = NULL, source_limit = NULL, overwrite = TRUE, temporary = TRUE, allow_executor = TRUE, temp_source = mk_tmp_name_source("rquery_ex"), env = parent.frame() )Arguments source
data.frame or database connecton (rquery_db_info class or DBI connections preferred).
optreerelop operation tree.
...force later arguments to bind by name.
limitnumeric, if set limit to this many rows during data bring back (not used when landing a table).
source_limitnumeric if not NULL limit sources to this many rows.
overwritelogical if TRUE drop an previous table.
temporarylogical if TRUE try to create a temporary table.
allow_executorlogical if TRUE allow any executor set as rquery.rquery_executor to be used.
temp_sourcetemporary name generator.
envenvironment to work in.
Valuedata.frame
See alsomaterialize
, db_td
, to_sql
, rq_copy_to
, mk_td
# WARNING: example tries to change rquery.rquery_db_executor option to RSQLite and back. if (requireNamespace("DBI", quietly
= TRUE) && requireNamespace("RSQLite", quietly
= TRUE)) { my_db <- DBI::dbConnect(RSQLite::SQLite(),
":memory:") old_o <- options(list("rquery.rquery_db_executor" = list(db
= my_db))) d <- rq_copy_to(my_db,
'd',
data.frame(AUC
= 0.6, R2
= 0.2)) optree <- extend_se(d,
c("v" %:=% "AUC + R2",
"x" %:=% "pmax(AUC,v)")) print(optree) cat(format(optree)) v <- execute(my_db,
optree) print(v) v2 <- execute(data.frame(AUC
= 1, R2
= 2),
optree) print(v2) options(old_o) DBI::dbDisconnect(my_db) }#> [1] "mk_td(\"d\", c( \"AUC\", \"R2\")) %.>% extend(., v := AUC + R2) %.>% extend(., x := pmax(AUC, v))" #> mk_td("d", c( #> "AUC", #> "R2")) %.>% #> extend(., #> v := AUC + R2) %.>% #> extend(., #> x := pmax(AUC, v)) #> AUC R2 v x #> 1 0.6 0.2 0.8 0.8 #> AUC R2 v x #> 1 1 2 3 3
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4