dbReadTable,SQLiteConnection,character-method {RSQLite} | R Documentation |
Returns the contents of a database table given by name as a data frame.
## 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)
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. |
Note that the data frame returned by dbReadTable()
only has
primitive data, e.g., it does not coerce character data to factors.
A data frame.
The corresponding generic function DBI::dbReadTable()
.
library(DBI) db <- RSQLite::datasetsDb() dbReadTable(db, "mtcars") dbReadTable(db, "mtcars", row.names = FALSE) dbDisconnect(db)