[R-sig-DB] Change in RMySQL? DBI?

Gabor Grothendieck ggrothend|eck @end|ng |rom gm@||@com
Sun Oct 26 23:03:00 CET 2014


An sqldf unit test that once worked that involves Date class with
MySQL is failing.  I can reduce it to the following which does not
involve sqldf  (assuming there exists a MySQL database called test).
Is this due to some change in RMySQL?  DBI?

library(RMySQL)

t1 <- data.frame(d = as.Date("2001-01-30"))
con <- dbConnect("MySQL", "test")
dbWriteTable(con, "t1", t1, row.names = FALSE)
dbGetQuery(con, "describe t1")

which produces:

  Field Type Null Key Default Extra
1     d text  YES        <NA>

but d should be of MySQL date type, not text.

> packageVersion("RMySQL")
[1] ‘0.9.3’
> packageVersion("DBI")
[1] ‘0.3.1’
> R.version.string
[1] "R version 3.1.1 Patched (2014-08-21 r66456)"


-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com




More information about the R-sig-DB mailing list