# NOT RUN {
db_path <- system.file("extdata", "example_dataBase.db", package = "eatDB")
## Extract variables from the first data table by name
# primary and foreign keys are added as required
dat1 <- dbPull(vSelect = c("age"), filePath = db_path)
## Extract all variables from the first data table
varNames <- dbNames(db_path)
dat2 <- dbPull(vSelect = varNames$NoImp, filePath = db_path)
## Extract variables from different data table (merged automatically)
dat3 <- dbPull(vSelect = c("weight", "noBooks", "pv"), filePath = db_path)
## Extract all variables from the data base
dat4 <- dbPull(filePath = db_path)
# }
Run the code above in your browser using DataLab