RMySQL problem with more than 1 field

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

RMySQL problem with more than 1 field

Tom Love
I am trying to use R (version 2.2.1) to extract and analyse data from  
a MySQL database on Mac OS X 10.4.4.  I've installed DBI and RMySQL,  
and it all works fine when I try to extract a single field of data,  
but when I try to extract more than one field R crashes and has to be  
restarted.  The SQL statements run absolutely fine when I try them  
directly in MySQL.  The lines below are a typical example: this  
crashes R as written here but works OK if I delete either the year or  
the sum_serv field from the query.

This problem holds for all queries I've tried in all databases.

Any suggestions about how I might be able to sort out this problem  
would be hugely appreciated.

Tom Love



------------------------------------------------------------------------
------------
aus <- dbConnect(drv="MySQL", username="xxx", password="yyyy",  
dbname="Australia")
vol <- dbSendQuery(aus, "SELECT STasman.YEAR, SUM(STasman.SERVICES)  
AS SUM_SERV FROM STasman GROUP BY STasman.YEAR")


        [[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