Re: [R] Grouping together a time variable

2012-02-09 Thread R. Michael Weylandt
Perhaps cut.POSIXt (which is a generic so you can just call cut) depending on the unstated form of your time object. Michael On Thu, Feb 9, 2012 at 12:15 PM, Abraham Mathew wrote: > I have the following variable, time, which is a character variable and it's > structured as follows. > >> head(as.

[R] Grouping together a time variable

2012-02-09 Thread Abraham Mathew
I have the following variable, time, which is a character variable and it's structured as follows. > head(as.character(dat$time), 30) [1] "00:00:01" "00:00:16" "00:00:24" > "00:00:25" "00:00:25" "00:00:40" "00:01:50" "00:01:54" "00:02:33" "00:02:43" > "00:03:22" [12] "00:03:31" "00:03:41" "00:03