Learn R Programming

rquery (version 0.2.0)

dbi_copy_to: Local table to DBI data source.

Description

Local table to DBI data source.

Usage

dbi_copy_to(db, table_name, d, ..., overwrite = FALSE, temporary = TRUE,
  rowidcolumn = NULL)

Arguments

db

database connection.

table_name

name of table to create.

d

data.frame to copy to database.

...

force later argument to be by name

overwrite

passed to dbWriteTable.

temporary

passed to dbWriteTable.

rowidcolumn

character, name to land row-ids.

Value

a relop representation of the data

Examples

Run this code
# NOT RUN {
my_db <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
d <- dbi_copy_to(my_db, 'd',
                data.frame(AUC = 0.6, R2 = 0.2))
sql <- to_sql(d, my_db)
cat(sql)
DBI::dbDisconnect(my_db)

# }

Run the code above in your browser using DataLab