I'm using this code to load the data from DB ontime
into the data frame in R.
library(RSQLite)
library(DBI)
ontime <- dbConnect(RSQLite::SQLite(), dbname = "ontime.sqlite3")
from_db <- function(sql) {
dbGetQuery(ontime, sql)
}
from_db("select count(*), tailnum from ontime group by tailnum")
tails <- from_db("select distinct tailnum from ontime")
However, it seems that R cannot find DB ontime
that I created from SQLite shell.
Error in sqliteSendQuery(con, statement, bind.data) :
error in statement: no such table: ontime
I tried to search ontime
on disk, but I didn't find it. I also double-checked that this DB exists by using select * from ontime
command. So, where is this DB stored on disk and how can I find it?