[R] RMySQL problem with more than 1 field

From: Tom Love <t_love_at_clear.net.nz>
Date: Fri 17 Feb 2006 - 11:02:47 EST


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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Feb 17 11:08:16 2006

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 14:08:37 EST