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 # 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 58115
2 59117
3 60120
4 61123
5 62126
6 63129
>
> 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.