I have a matrix with a POSIXct as a numeric in the first column. I would like to create a new matrix that is "grouped by" my chosed time bars.
i.e. So I would like to group by hour or day or 5 days, and have all my columns be summed or averaged or counted.. mydata: V1,V2,V3 10:03:13,3.4,1002 10:03:14,5.6,1001 10:05:27,7.2,999 10:05:33,8.2,998 I want to convert this into say 5 minutes "bars" and sum columns mynewdata: V1,V2,V3 10:00:00,9.0,2003 10:05:00,15.4,1997 How can I do this? -- View this message in context: http://n4.nabble.com/Group-by-tp1588694p1588694.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.