[R] sqldf error only on Unix not Windows

Gabor Grothendieck ggrothendieck at gmail.com
Mon Nov 1 14:46:36 CET 2010


On Mon, Nov 1, 2010 at 9:28 AM, Alex Bryant <abryant at i-review.com> wrote:
> Hello Group,
>
>                I am having trouble with the sqldf package on unix.  The same code works fine on windows.
>
> Silly Example script:
>
> # Load the package
> library(sqldf)
>
> # Use the titanic data set
>
> data(women)
> colnames(women)
> head(women)
>
> sqldf('select height, count(*) from women where height is not null group by weight')
>

Some things to try:

-  try adding dbname = tempfile() argument to your sqldf statement and
see if that makes any difference

- try it with the H2 database rather than sqlite (or with PostgreSQL)
  To use it with H2 make sure you have Java and the CRAN package, RH2,
installed.
  RH2 includes the H2 database itself so you don't need to install that.
  Then issue this line in R any time before your first sqldf call
     library(RH2)
  sqldf will notice it and automatically use the H2 database instead of sqlite

- try it with R 2.11

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-help mailing list