Skip to content

Instantly share code, notes, and snippets.

@alejio
Created October 9, 2016 16:50
Show Gist options
  • Save alejio/af8fe4d4a18c2958c9c6f3310316ceca to your computer and use it in GitHub Desktop.
Save alejio/af8fe4d4a18c2958c9c6f3310316ceca to your computer and use it in GitHub Desktop.
R: read sqlite db
library("RSQLite")
# connect to the sqlite file
con = dbConnect(RSQLite::SQLite(), dbname="database.sqlite")
# get a list of all tables
alltables = dbListTables(con)
# get tables as df
df.country = dbGetQuery( con,'select * from Country' )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment