data.table
1.9.6 throws an error when you try to assign a POSIXlt date to a column
ex:
dt <- data.table(strdate = c("20140101", "20140103"))
dt[, date := strptime(strdate, "%Y%m%d")]
Warning message:
In `[.data.table`(dt, , `:=`(date, strptime(strdate, "%Y%m%d"))) :
Supplied 11 items to be assigned to 2 items of column 'date' (9 unused)
dt
strdate date
1: 20140101 0,0
2: 20140103 0,0
However, a data frame works
df <- as.data.frame(dt)
df$date <- strptime(df$strdate, "%Y%m%d")
df
strdate date
1 20140101 2014-01-01
2 20140103 2014-01-03
Is there something about data.table
that makes it unable to handle this data type?