Fastest way to extract hour from time (HH:MM)
问题 Wish fastPOSIXct works - but not working in this case. Here is my time data (which does not have dates) - and I need to get the hours-part from them. times <- c("9:46","11:06", "14:17", "19:53", "0:03", "3:56") Here is the wrong output from fastPOSIXct : fastPOSIXct(times, "GMT") [1] "1970-01-01 00:00:00 GMT" "1970-01-01 00:00:00 GMT" [3] "1970-01-01 00:00:00 GMT" "1970-01-01 00:00:00 GMT" [5] "1970-01-01 00:00:00 GMT" "1970-01-01 00:00:00 GMT" It does not recognize the times without the