I am unable to list tables for the sqlite database I am connecting to from R.
I setup the tables in my database (WBS_test1.db) using "DB Browser" https://sqlitebrowser.org/
Looking at this db in the command window, I am able to list the tables via .tables and view the data headers via .schema so I know they are (can also preview in DB Browser of course).
In R however..., I set my working directory, etc.
library(DBI)
library(RSQLite)
setwd(dir = "C:/here/there/folder")
sqlite <- dbDriver("SQLite")
I then connect to the database and attempt to list the tables and fields in one of the tables specifically
DBtest <- dbConnect(sqlite,"WBS_Test1.db")
dbListTables(DBtest)
dbListFields(DBtest, "WBS_CO2")
I get a "character(0)" returned, which from searching around looks like it's saying the tables are temporary.
I've also tried using the dplyr package
library(dplyr)
# connect to the sqlite file
test_db <- src_sqlite("C:/SQLite/WBS_test.db", create = TRUE)
src_tbls(test_db)
This again returns a "character(0)"
I have no prior experience with SQLite and modest experience in R so I'm probably missing something simple but I can't figure it out. Suggestions??? Maybe I'm not directing my wd in the correct location for the RSQLite package?
Thanks!