RSQLite 2.0 breaks sqldf

86 views
Skip to first unread message

Gabor Grothendieck

unread,
Jun 22, 2017, 8:43:38 AM6/22/17
to sqldf
Several people have posted that RSQLite 2.0 breaks sqldf causing an error to be produced for nearly every sqldf statement run.

I have posted an issue on the RSQLite issues list.

Until that is resolved (1) use an older version of RSQLite or (2) use the RH2 (or other) backend or (3) use MySQL or PostgreSQL backends.

The RH2 backend is the easiest to install since it only requires that you install java and the RH2 package - H2 itself is already included in RH2.   If RH2 is loaded sqldf will notice it and use it instead of SQLite.

    # install java
    library(RH2)
    library(sqldf)
    # can now issue sqldf statements using selects acceptable to H2

H2 does have more builtin functions that SQLite and also has true date and datetime types which SQLite lacks.


Gabor Grothendieck

unread,
Jun 22, 2017, 9:29:12 PM6/22/17
to sqldf
Until the new version of sqldf is loaded onto CRAN try using the github versoin of sqldf.

    library(devtools)
    install_github("ggrothendieck/sqldf")

    # now it should work with RSQLite 2.0
    library(sqldf)
    sqldf("select * from BOD")

Please report any problems.

tjcr...@gmail.com

unread,
Jun 23, 2017, 8:08:47 AM6/23/17
to sqldf
Thank you so much!

Reply all
Reply to author
Forward
0 new messages