dbReadTable

0th

Percentile

Copy data frames to and from database tables.

dbReadTable: database table -> data frame; dbWriteTable: data frame -> database table.

Usage
dbReadTable(conn, name, ...)
dbWriteTable(conn, name, value, ...)
Arguments
conn
A DBIConnection object, as produced by dbConnect.
name
A character string specifying a DBMS table name.
...
Other parameters passed on to methods.
value
a data.frame (or coercible to data.frame).
Value

a data.frame.

Note

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.

See Also

Other connection methods: dbDisconnect, dbExistsTable, dbGetException, dbGetQuery, dbListFields, dbListResults, dbListTables, dbRemoveTable, dbSendQuery

Aliases
  • dbReadTable
  • dbWriteTable
Examples
if (require("RSQLite")) {
con <- dbConnect(RSQLite::SQLite(), ":memory:")

dbWriteTable(con, "mtcars", mtcars[1:10, ])
dbReadTable(con, "mtcars")

dbDisconnect(con)
}
Documentation reproduced from package DBI, version 0.4-1, License: LGPL (>= 2)

Community examples

Looks like there are no examples yet.