get_db: The sqlite database for the SQL Murder Mystery

Description Usage Value Examples

View source: R/create_db.R

Description

This database is bundled with the package, and contains all data frames in the reclues package. If called it returns the connection to the SQLite DB which can then be used to get more information, run queries etc.

Usage

1

Value

A connection to the sql-murder-mystery.db which is a SQLite database provided by '@knightlab'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(DBI)
library(dplyr)
db <- reclues::get_db()
DBI::dbListTables(db)

DBI::dbGetQuery(db, "SELECT * FROM crime_scene_report LIMIT 10")

# Use dplyr to connect to the database and view a few of the entries in the table
dplyr::tbl(db, "crime_scene_report")

DBI::dbDisconnect(db)

sciencificity/reclues documentation built on Nov. 5, 2019, 8:45 a.m.