# \donttest{
# Connect to the database instance via `dplyr`
db_air <- src_scidb("airlines")
db_air
# }
# \donttest{
# Connect to the database instance via `DBI` (recommended)
db_air <- dbConnect_scidb("airlines")
db_air
# Get more information...
if (require(DBI)) {
# About the database instance
dbGetInfo(db_air)
# About the available tables
dbListTables(db_air)
# About the variables in a particular table
dbListFields(db_air, "flights")
# About the indexes (using raw SQL)
dbGetQuery(db_air, "SHOW KEYS FROM flights")
}
# }
if (require(knitr)) {
opts_chunk$set(engine.opts = mysql_scidb("airlines"))
}
Run the code above in your browser using DataLab