Skip to content

Instantly share code, notes, and snippets.

@jwolfson
Last active April 19, 2024 01:42
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jwolfson/72bc7d7fd8d339955b38 to your computer and use it in GitHub Desktop.
Save jwolfson/72bc7d7fd8d339955b38 to your computer and use it in GitHub Desktop.
Reading an SQLite .db file into R
library(RSQLite)
filename <- "your_db_file.db"
sqlite.driver <- dbDriver("SQLite")
db <- dbConnect(sqlite.driver,
dbname = filename)
## Some operations
dbListTables(db)
mytable <- dbReadTable(db,"your_table_name")
@sureshsigma
Copy link

Thanks !

@jtfields
Copy link

I tried this code and received this message "package ‘dbDriver’ is not available (for R version 3.5.3)". Any suggestions for how to resolve?

@martakarass
Copy link

It worked perfectly fine with me. I have R version 3.6.0.

@kathalexknuts
Copy link

very helpful - thanks!

@Aaron-maku
Copy link

thanks dude! this took me a while to solve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment