Hi Ivan Thanks for getting back to me. Can you please share with me some code I would use to see what is in my database? On Sat, 1 Feb 2020 at 06:19, Ivan Krylov <krylov.r00t at gmail.com> wrote:> On Fri, 31 Jan 2020 17:02:16 -0600 > Ana Marija <sokovic.anamarija at gmail.com> wrote: > > > I have a database DGN-WB_0.5.db is there is a way to explore its > > content in R? > > My psychic debugging powers tell me that it's an SQLite database, so > the answer to your question is: yes, it should be possible to both find > out the schema and run SQL queries on your file from R. > > -- > Best regards, > Ivan >[[alternative HTML version deleted]]
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:> Hi Ivan > > Thanks for getting back to me. Can you please share with me some code I > would use to see what is in my database? > > On Sat, 1 Feb 2020 at 06:19, Ivan Krylov <krylov.r00t at gmail.com> wrote: > > > On Fri, 31 Jan 2020 17:02:16 -0600 > > Ana Marija <sokovic.anamarija at gmail.com> wrote: > > > > > I have a database DGN-WB_0.5.db is there is a way to explore its > > > content in R? > > > > My psychic debugging powers tell me that it's an SQLite database, so > > the answer to your question is: yes, it should be possible to both find > > out the schema and run SQL queries on your file from R. > > > > -- > > Best regards, > > Ivan > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- John Kane Kingston ON Canada [[alternative HTML version deleted]]
Hi John, I tried it but this is what I got:> library(RSQLite) > filename <- "DGN-WB_0.5.db" > sqlite.driver <- dbDriver("SQLite") > db <- dbConnect(sqlite.driver,+ dbname = filename) Warning message: Couldn't set synchronous mode: disk I/O error Use `synchronous` = NULL to turn off this warning. Please advise, Ana On Sat, Feb 1, 2020 at 8:55 AM John Kane <jrkrideau at gmail.com> wrote:> > 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: >> >> Hi Ivan >> >> Thanks for getting back to me. Can you please share with me some code I >> would use to see what is in my database? >> >> On Sat, 1 Feb 2020 at 06:19, Ivan Krylov <krylov.r00t at gmail.com> wrote: >> >> > On Fri, 31 Jan 2020 17:02:16 -0600 >> > Ana Marija <sokovic.anamarija at gmail.com> wrote: >> > >> > > I have a database DGN-WB_0.5.db is there is a way to explore its >> > > content in R? >> > >> > My psychic debugging powers tell me that it's an SQLite database, so >> > the answer to your question is: yes, it should be possible to both find >> > out the schema and run SQL queries on your file from R. >> > >> > -- >> > Best regards, >> > Ivan >> > >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > > > > -- > John Kane > Kingston ON Canada