RMySQL problem with more than 1 field

Previous Topic Next Topic
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",  
vol <- dbSendQuery(aus, "SELECT STasman.YEAR, SUM(STasman.SERVICES)  

        [[alternative HTML version deleted]]

[hidden email] mailing list
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html