sqldf problems

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

sqldf problems

Juanda
Hello:
I'm trying to run this code

data2 <- sqldf (" SELECT plot, age,  avg(N) as N FROM data1 GROUP BY plot,
t")

The problem is that when calling sqldf with
>require(sqldf)

appears this message

Warning message:
In sqliteCloseConnection(conn, ...) :
  RS-DBI driver warning: (closing pending result sets before closing this
connection)

If try again

>require(sqldf)

the message does not appear, but when trying the code afterwards, I get a
new message

Error in sqliteFetch(rs, n = -1, ...) :
  RSQLite driver: (RS_SQLite_fetch: failed: Domain error)

I have a new Windows 8.1

Do I need any other installations o packages or something else?
The code was working in older Windows XP and Linux

Thanks

--
**************************************************************************************
Juan Daniel García Villabrille, Ingeniero de Montes, colegiado nº 5.319
627 188 682
e-mail: [hidden email]
**************************************************************************************
Cuando imprima este correo, no olvide reciclarlo. Porque el papel es el
soporte natural, renovable y reciclable de lo más humano: la palabra.

##-- AVISO --##
La información a incluir en este e-mail es CONFIDENCIAL, siendo de uso
exclusivo del destinatario arriba mencionado. Si usted lee este mensaje y
no es el destinatario indicado, le informamos que está totalmente prohibida
cualquier utilización, divulgación, distribución y/o reproducción de esta
comunicación sin autorización expresa en virtud de la legislación vigente.
Si ha recibido este mensaje por error, le rogamos nos lo notifique
inmediatamente por esta misma vía y proceda a su eliminación.

        [[alternative HTML version deleted]]


______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: sqldf problems

Gabor Grothendieck
2014-07-14 7:52 GMT-04:00 Juan Daniel García <[hidden email]>:

> Hello:
> I'm trying to run this code
>
> data2 <- sqldf (" SELECT plot, age,  avg(N) as N FROM data1 GROUP BY plot,
> t")
>
> The problem is that when calling sqldf with
>>require(sqldf)
>
> appears this message
>
> Warning message:
> In sqliteCloseConnection(conn, ...) :
>   RS-DBI driver warning: (closing pending result sets before closing this
> connection)
>
> If try again
>
>>require(sqldf)
>
> the message does not appear, but when trying the code afterwards, I get a
> new message
>
> Error in sqliteFetch(rs, n = -1, ...) :
>   RSQLite driver: (RS_SQLite_fetch: failed: Domain error)
>
> I have a new Windows 8.1
>
> Do I need any other installations o packages or something else?
> The code was working in older Windows XP and Linux
>

See the Troubleshooting section of the sqldf home page.
http://sqldf.googlecode.com

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: sqldf problems

Jeff Newmiller
In reply to this post by Juanda
One doesn't "call" a package... so your description is unclear. One doesn't load (using the require or library functions) the relevant package AFTER calling functions in the package. Since it appears you have left out some steps or described them out of order, please supply a reproducible example [1] (including a test data set) as the Posting Guide requests.

NB I don't have Windows 8 or 8.1, so if that turns out to be the problem then I won't be able to tell, but I have a feeling there is something more basic going on here.

[1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[hidden email]>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.

On July 14, 2014 4:52:18 AM PDT, "Juan Daniel García" <[hidden email]> wrote:

>Hello:
>I'm trying to run this code
>
>data2 <- sqldf (" SELECT plot, age,  avg(N) as N FROM data1 GROUP BY
>plot,
>t")
>
>The problem is that when calling sqldf with
>>require(sqldf)
>
>appears this message
>
>Warning message:
>In sqliteCloseConnection(conn, ...) :
>RS-DBI driver warning: (closing pending result sets before closing this
>connection)
>
>If try again
>
>>require(sqldf)
>
>the message does not appear, but when trying the code afterwards, I get
>a
>new message
>
>Error in sqliteFetch(rs, n = -1, ...) :
>  RSQLite driver: (RS_SQLite_fetch: failed: Domain error)
>
>I have a new Windows 8.1
>
>Do I need any other installations o packages or something else?
>The code was working in older Windows XP and Linux
>
>Thanks

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: sqldf problems

Juanda
This post has NOT been accepted by the mailing list yet.
In reply to this post by Gabor Grothendieck
Hello again

In the first script I sent I tried to be simplistic, but I found that the error occurs when trying to run

     sqrt(N) as N

inside the code.

This worked for long time. There are other functions for squared values, I think **0.5, but R gives me a message: error near '*'