When trying to connect to this database by copying their code I get the error:
"Could not connect to database: unable to open database file"
The code :
tidy_finance <- dbConnect(
SQLite(),
"data/tidy_finance.sqlite",
extended_types = TRUE
)
Collecting comments to an answer.
Either opens the existing
data/tidy_finance.sqlite
file or if the file is missing, creates an empty database. Problem arises when it can't find existingdata/
directory. One could just remove directory from sqlite file path, but we can also check and create the missing folder in R before attempting to create / open sqlite file.:Created on 2022-10-14 with reprex v2.0.2