search for: unlistposixct

Displaying 1 result from an estimated 1 matches for "unlistposixct".

2013 May 20
3
as.vector with mode="list" and POSIXct
...to change."?It would appear that treatment for POSIXct is either missing or needs adjustment. Unlist (for the reverse) is documented to converting to base types, so I can't complain. Just wanted to share that I ended up giving up on vectorization and writing the two following functions: unlistPOSIXct <- function(x) { ? retval = rep(Sys.time(), length(x)) ? for (i in 1:length(x)) retval[i] = x[[i]] ? return(retval) } listPOSIXct <- function(x) { ? retval = list() ? for (i in 1:length(x)) retval[[i]] = x[i] ? return(retval) } Is there a better way to do this (other than using *apply inste...