How would I extract the time from a series of POSIXct objects discarding the date part?
For instance, I have:
times <- structure(c(1331086009.5009
The data.table package has a function 'as.ITime', which can do this efficiently use below:
data.table
as.ITime
library(data.table) x <- "2012-03-07 03:06:49 CET" as.IDate(x) # Output is "2012-03-07" as.ITime(x) # Output is "03:06:49"