[R] time series manipulation what functions are "best"

Henry hccoles at lbl.gov
Fri Feb 17 01:31:15 CET 2012


Newbie question - mechanical engineer trying to learn R
I've had success with plotting time series data and even made a heat map
using R Graphs Cookbook by Mittal.
I have a new problem - I need to align a number of time series data
"columns" to the desired regular exact time stamp vector. The target time
vector could be finer or more course than the typical time stamp spacing
found.  Probably the two time stamp spacings I will want is 1 minute or 5
minutes.  Then I need to look at the average for 15 minute blocks of time.
This is likely a bit different problem.
Should I look at zoo functions, I installed the zoo package or look at
approx, approxfun, spline, splinefun?  Zoo seemed to come up most frequently
searching here and with Google.

I think I want a curve fit type (I think there are multiple types)
interpolation not just straight line.

Here is a sample of my data:

I can get the time all in one "box" in csv format.  I've used as.POSIXlt
previous to this with success.  Zoo functions seem to also have time
functions, so that is a bit confusing.


10/11/2011 23:30:01	432.22
10/11/2011 23:31:17	432.32
10/11/2011 23:35:00	432.32
10/11/2011 23:36:18	432.22
10/11/2011 23:37:18	432.72
10/11/2011 23:39:19	432.23
10/11/2011 23:40:02	432.23
10/11/2011 23:45:00	432.23
10/11/2011 23:45:20	429.75
10/11/2011 23:46:20	429.65
10/11/2011 23:50:00	429.65
10/11/2011 23:51:22	429.75
10/11/2011 23:55:01	429.75
10/11/2011 23:56:23	429.55
10/12/2011 0:00:07	429.55
10/12/2011 0:01:24	429.95
10/12/2011 0:05:00	429.95
10/12/2011 0:06:25	429.85
10/12/2011 0:10:00	429.85
10/12/2011 0:11:26	428.85
10/12/2011 0:15:00	428.85
10/12/2011 0:20:03	428.85
10/12/2011 0:21:29	428.75
10/12/2011 0:25:01	428.75
10/12/2011 0:30:01	428.75
10/12/2011 0:31:31	428.75

Thanks much,
-Henry


--
View this message in context: http://r.789695.n4.nabble.com/time-series-manipulation-what-functions-are-best-tp4395939p4395939.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list