example_db_connect | R Documentation |
This function creates a connection to an in-memory SQLite database, with the option to add a table to the database. This function is intended to facilitate examples, vignettes, and package tests.
example_db_connect(df = NULL)
df |
Optional data.frame to add to the database. |
connection from DBI::dbConnect()
con <- example_db_connect(mtcars)
x <- DBI::dbGetQuery(con, "SELECT * FROM mtcars;")
head(x)
DBI::dbDisconnect(con)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.