Re: [R] How to average time series data around regular intervals

2012-08-28 Thread Jim Holtman
your specification was to have the data centered at 15 minute intervals and extend 7.5 minutes on either side. on my output you see the time of the lower value of the interval. 11:52:30 is the lower value of the 12:00:00 time. so you can just add back the 7.5 minutes to the time value to get

Re: [R] How to average time series data around regular intervals

2012-08-28 Thread Jason Gilmore
Hi Jim, Oh wow thanks so much. One question though, did you notice that the 12:00:00 slot is missing entirely from the output? It shows 11:52:30 and 12:07:30, but not 12:00:00. Actually after another review I see that it's missing the 12, 12:15, and 12:30? >2012-07-22 11:52:30 2012-07-22 12:07:30

Re: [R] How to average time series data around regular intervals

2012-08-27 Thread jim holtman
try this: > x <- read.table(text = "2012-07-22 12:12:00, 21 + 2012-07-22 12:15:00, 22 + 2012-07-22 12:18:00, 24 + 2012-07-22 12:39:00, 21 + 2012-07-22 12:45:00, 25 + 2012-07-22 12:49:00, 26 + 2012-07-22 12:53:00, 20 + 2012-07-22 13:00:00, 18 + 2012-07-22 13:06:00, 22", colClasses = c("POSIXct", "

[R] How to average time series data around regular intervals

2012-08-27 Thread Jason Gilmore
Hi, I'm pretty new to R and have run into a task which although I'm certain is within R's capabilities, falls outside of mine. :-) Consider the following data set: 2012-07-22 12:12:00, 21 2012-07-22 12:15:00, 22 2012-07-22 12:18:00, 24 2012-07-22 12:39:00, 21 2012-07-22 12:45:00, 25 2012-07-22 12