I have a data.table that contains real data. That means that some values
are missing. I am trying to convert one column into data.table's idate and
itime. Alas I am running into problems.

But look at this

*> IDateTime(as.POSIXlt(c("2015-05-01 13:46:23", "2015-05-03 16:40:00")))*
        idate    itime
1: 2015-05-01 13:46:23
2: 2015-05-03 16:40:00

*> IDateTime(as.POSIXlt(c("2015-05-01 13:46:23", "2015-05-03 16:40:00", NA
)))*
Error in if (any(neg)) res[neg] = paste("-", res[neg], sep = "") :
  missing value where TRUE/FALSE needed

A missing variable screws everything up. Any insights or suggestions for
me? At this point I will have to systematically select rows that meet
!is.na(datevariable)
to perform the IDateTime function on.


-- 
Farrel Buchinsky
(412) 567-7870 (gets me everywhere)
_______________________________________________
datatable-help mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help

Reply via email to