4

When I run the first example from sqldf function documentation:

library(sqldf)
a1s <- sqldf("select * from warpbreaks limit 6")

I get an error:

Error in if (.allows_extensions(db)) { :missing value where TRUE/FALSE needed    

This error appeared today after updating some packages to their latest versions. Any suggestions how to fix this or how to revert to previous versions?

tomaz
  • 493
  • 4
  • 13
  • I guess it has something to do with this [link](https://www.mail-archive.com/r-sig-db@r-project.org/msg00488.html). – tomaz Oct 26 '14 at 09:41
  • I've solved the issue with [package checkpoint](http://blog.revolutionanalytics.com/2014/10/introducing-rrt.html). – tomaz Oct 26 '14 at 09:42
  • Please write out the specific lines of code you used to solve this in an answer. (You are allowed to answer you own question.) – G. Grothendieck Oct 26 '14 at 12:57
  • Note that a new version of sqldf has been uploaded to CRAN and should be available shortly. – G. Grothendieck Oct 27 '14 at 02:38

3 Answers3

7

Adding the following code to the beginning of my script solved the issue

library(checkpoint)
checkpoint("2014-10-08") # the date when the script worked fine
tomaz
  • 493
  • 4
  • 13
  • 1
    This is a great example of using the `checkpoint` package. More information at http://blog.revolutionanalytics.com/2014/10/introducing-rrt.html – Andrie Oct 27 '14 at 18:57
0

Update of sqldf package solved this for me. Latest version might not be available through official CRAN, though. You have to do it manually.

The update is explained here.

Community
  • 1
  • 1
opplatek
  • 23
  • 3
0

I'm adding this as the link provided above by opplatek returned an Object Not Found (404) error.

So here's the location of all the sqldf package archive versions:

Also, what eliminated the sqldf error for me was to upgrade to R 3.1.2 - Pumpkin Helmet.

Jazzmine
  • 1,837
  • 8
  • 36
  • 54
  • 1
    The new RSQLite package is a big step forward but is not fully compatible with the old version. sqldf was revised to handle this so you must ensure that you have the latest versions of all packages involved as well as R. This is all discussed under Latest News on the sqldf home page: http://sqldf.googlecode.com – G. Grothendieck Feb 08 '15 at 01:48