order_expr_se: Make a order_expr node.

View source: R/order_expr.R

order_expr_seR Documentation

Make a order_expr node.

Description

Make a order_expr node.

Usage

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

Arguments

source

source to select from.

expr

expression to order_expr in ascending order.

env

environment to look for values in.

Value

select columns 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 <- order_expr_se(d, "AUC/R2")
  cat(format(optree))
  sql <- to_sql(optree, my_db)
  cat(sql)
  print(DBI::dbGetQuery(my_db, sql))
  DBI::dbDisconnect(my_db)
}

rquery documentation built on Aug. 20, 2023, 9:06 a.m.