Skip to content
Prev 13772 / 398502 Next

blues in c

Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:
Speaking of the devil... Is there any reason as.POSIXct shouldn't work
on numeric data?
Error in as.POSIXct.default(0) : Don't know how to convert `0' to class "POSIXct"
[1] "1970-01-01 01:00:00 CET"

(Discovered by trying

c.POSIXct <- function(..., recursive=FALSE)
    as.POSIXct(c(unlist(lapply(list(...), unclass))))

)