[datatable-help] Bug When Using data.table with lubridate?

Michael Smith my.r.help at gmail.com
Thu Jul 23 16:30:21 CEST 2015


I get the following subsetting error with the dev version of data.table. 
The problem occurs when a column contains a time interval object from 
lubridate.

library("lubridate")
library("data.table")
Sys.setenv(TZ = "GMT")
d <- seq(Sys.Date() - 88, Sys.Date() - 8, "month")
DT <- data.table(start = d, end = d + 8)
DT[, itvl := interval(start, end)]
DT[1]

Error in `rownames<-`(`*tmp*`, value = paste(format(rn, right = TRUE),  :
   length of 'dimnames' [1] not equal to array extent



Is there any way to get around this, or is this a bug?

Thanks,

M


More information about the datatable-help mailing list