| dbReadTable {DBI} | R Documentation |
dbReadTable: database table -> data frame; dbWriteTable:
data frame -> database table.
dbReadTable(conn, name, ...) dbWriteTable(conn, name, value, ...)
conn |
A |
name |
A character string specifying a DBMS table name. |
... |
Other parameters passed on to methods. |
value |
a data.frame (or coercible to data.frame). |
a data.frame.
The translation of identifiers between R and SQL is done through calls
to make.names and make.db.names, but we cannot
guarantee that the conversion is reversible. For details see
make.db.names.
Other connection methods: dbDisconnect;
dbExistsTable;
dbGetException; dbGetQuery,
dbGetQuery,DBIConnection,character-method;
dbListFields; dbListResults;
dbListTables; dbRemoveTable;
dbSendQuery
if (require("RSQLite")) {
con <- dbConnect(RSQLite::SQLite(), ":memory:")
dbWriteTable(con, "mtcars", mtcars[1:10, ])
dbReadTable(con, "mtcars")
dbDisconnect(con)
}