Closed mclements closed 7 years ago
I found this bug when (a) reading a file from Stata to R using read.dta() and then (b) writing from R to MonetDBLite using dbWriteTable(). A minimal test:
read.dta()
dbWriteTable()
library(DBI) library(MonetDBLite) dbpath <- tempdir() con <- dbConnect(MonetDBLite::MonetDBLite(), dbpath) dbWriteTable(con, "test_double_date", data.frame(double_date=structure(1,class="Date")), overwrite=TRUE) dbWriteTable(con, "test_integer_date", data.frame(integer_date=structure(1L,class="Date")), overwrite=TRUE) dbDisconnect(con)
I found this bug when (a) reading a file from Stata to R using
read.dta()
and then (b) writing from R to MonetDBLite usingdbWriteTable()
. A minimal test:library(DBI) library(MonetDBLite) dbpath <- tempdir() con <- dbConnect(MonetDBLite::MonetDBLite(), dbpath) dbWriteTable(con, "test_double_date", data.frame(double_date=structure(1,class="Date")), overwrite=TRUE) dbWriteTable(con, "test_integer_date", data.frame(integer_date=structure(1L,class="Date")), overwrite=TRUE) dbDisconnect(con)