dbReadTable_SQLiteConnection_character {RSQLite} | R Documentation |
Read a database table
Description
Returns the contents of a database table given by name as a data frame.
Usage
## S4 method for signature 'SQLiteConnection,character'
dbReadTable(
conn,
name,
...,
row.names = pkgconfig::get_config("RSQLite::row.names.table", FALSE),
check.names = TRUE,
select.cols = NULL
)
Arguments
conn |
a |
name |
a character string specifying a table name. SQLite table names
are not case sensitive, e.g., table names |
... |
Needed for compatibility with generic. Otherwise ignored. |
row.names |
Either If A string is equivalent to For backward compatibility, |
check.names |
If |
select.cols |
Deprecated, do not use. |
Details
Note that the data frame returned by dbReadTable()
only has
primitive data, e.g., it does not coerce character data to factors.
Value
A data frame.
See Also
The corresponding generic function DBI::dbReadTable()
.
Examples
library(DBI)
db <- RSQLite::datasetsDb()
dbReadTable(db, "mtcars")
dbReadTable(db, "mtcars", row.names = FALSE)
dbDisconnect(db)