[R] High frequency time-series

v.demart@libero.it v.demart at libero.it
Wed Oct 22 15:09:43 CEST 2003


Having to collect hourly electricity loads and quarter-of-an-hour electricity production data for some years I think that the tidiest way of doing it is to resort to ts but I don't know how to define such a frequency starting from a set date.

Leafing through r-help mail archives I've found this *ALMOST* satisfactory message:
==========================================================
.........
 > I have a series of hourly rainfall and quarterly flow 
> measurements (i.e. 4 times an hour) of a catchment
........
> Maybe time series are easier, but in 
> 
> ts(data = NA, start = X,... 
> 
> X should be a number or a vector. how does this coresponds to a 
> data and hour (e.g. april 26,2002, 15:00:00)? 


If your observations are equidistant, e.g. you've got 24 hourly 
measurements per day, you could do something like this for the above 
example: 


R> rain <- ts(rain, start = c(26, 15), freq = 24) 
R> flow <- ts(flow, start = c(26, 15), freq = 96) 
...........
============================================================

But how does R know that we are speaking of a timeseries starting from April 26, 2002 and not, say, Feb 26, 2000?
There's some piece of info missing in the answer.

Am I correct?
Please help.

Ciao from Rome

Vittorio




More information about the R-help mailing list