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') Unix Output and error: bash-3.00$ R --vanilla <testR.R R version 2.10.1 (2009-12-14) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # Load the package > library(sqldf) Loading required package: DBI Loading required package: RSQLite Loading required package: RSQLite.extfuns Loading required package: gsubfn Loading required package: proto Loading required package: tcltk Loading Tcl/Tk interface ... done Loading required package: chron > > > # Use the titanic data set > > data(women) > colnames(women) [1] "height" "weight" > head(women) height weight 1 58 115 2 59 117 3 60 120 4 61 123 5 62 126 6 63 129 > > sqldf('select height, count(*) from women where height is not null group by > weight') Error in sqliteFetch(rs, n = -1, ...) : RSQLite driver: (RS_SQLite_fetch: failed first step: SQL logic error or missing database) Calls: sqldf ... dbGetQuery -> sqliteQuickSQL -> sqliteFetch -> .Call Error in !dbPreExists : invalid argument type Calls: sqldf ... dbGetQuery -> sqliteQuickSQL -> sqliteFetch -> .Call Execution halted Warning message: RS-DBI driver warning: (closing pending result sets before closing this connection) Box: Solaris: SunOS icsun7 5.10 Generic_118822-25 sun4u sparc SUNW,Sun-Fire-280R I am unable to find any hits on the generated errors which makes me think either something is really wrong (resource issues or something) or this is not a common use of sqldf?? Is there a better package I should be using? Thank you very much for your help, Alex Bryant Software Development Integrated Clinical Systems, Inc. 908-996-7208 ________________________________ Confidentiality Note: This e-mail, and any attachment to...{{dropped:13}} ______________________________________________ R-help@r-project.org mailing list 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.