# NOT RUN {
my_db <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
DBI::dbWriteTable(my_db,
'd',
data.frame(AUC = 0.6, R2 = 0.2),
overwrite = TRUE,
temporary = TRUE)
d <- dbi_table(my_db, 'd')
print(d)
sql <- to_sql(d, my_db)
cat(sql)
DBI::dbGetQuery(my_db, sql)
cols <- columns_used(d)
print(cols)
sql2 <- to_sql(d, my_db, using = "AUC")
cat(sql2)
DBI::dbGetQuery(my_db, sql2)
DBI::dbDisconnect(my_db)
# }
Run the code above in your browser using DataLab