Created
October 9, 2016 16:50
-
-
Save alejio/af8fe4d4a18c2958c9c6f3310316ceca to your computer and use it in GitHub Desktop.
R: read sqlite db
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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