Learn R Programming

qryflow (version 0.2.0)

example_db_connect: Create an example in-memory database

Description

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.

Usage

example_db_connect(df = NULL)

Value

connection from DBI::dbConnect()

Arguments

df

Optional data.frame to add to the database.

Examples

Run this code
con <- example_db_connect(mtcars)

x <- DBI::dbGetQuery(con, "SELECT * FROM mtcars;")

head(x)

DBI::dbDisconnect(con)

Run the code above in your browser using DataLab