Description Usage Arguments Value Author(s) Examples
Fetch the result of a specific query from an SQLite database
1 | sqliteQuery(query, file)
|
query |
The SQL query to submit |
file |
Path to the SQLite database file |
The result of the query as a data.frame.
Kevin Rue-Albrecht and Stephen Sansom
1 2 3 4 5 6 7 8 9 10 11 12 | # Setup ----
library(RSQLite)
database_file <- tempfile()
conn <- dbConnect(SQLite(), dbname = database_file)
dbWriteTable(conn, "mtcars", mtcars[1:5, ])
dbDisconnect(conn)
# Example ----
sqliteQuery("select * from mtcars", database_file)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.