Re: [R] working with zoo time index ??

From: Gabor Grothendieck <>
Date: Thu, 17 Jun 2010 11:38:58 -0400

On Thu, Jun 17, 2010 at 7:38 AM, skan <> wrote:
> Hi again.
> I have several files with data like above. Each file has different periods.
> My idea is to use zoo in order to do this...
> Converting all data to same period, the smaller one, 5 minutes.
> Whenever a datum doesn't exist copy the last one. (carry forward)
> Add data of every 5 minutes getting a new series.
> With the new series....
> run a loop:
> every day I save the first data
> I substract every datum within this day from the saved data for tihs day
> And I check if that substraction accomplishes some test, for example equals
> a number.
> I this test is not fulfilled I continue to the end of the day. Then I store
> the value of the subratcion last an I start with the next day.
> If it's fulffiled I store the value of the substraction that fulfilled the
> test and I jump directly to the next day.

As already suggested read the three vignettes that come with zoo and also read ?aggregate.zoo and look at the examples in that help file. Also look at other help files as needed and the answers I have already given. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 17 Jun 2010 - 15:52:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 17 Jun 2010 - 16:00:33 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive