Skip to content
Prev 382489 / 398500 Next

how to read a database in R?

Hi Ana
Stolen from https://gist.github.com/jwolfson/72bc7d7fd8d339955b38
I cannot remember if you will need to install any other packages besides
RSQLite

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"

Best of luck
On Sat, 1 Feb 2020 at 07:53, Ana Marija <sokovic.anamarija at gmail.com> wrote: