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

From: skan <>
Date: Thu, 17 Jun 2010 04:38:04 -0700 (PDT)

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.

Can you do all this with "aggregate" ?

View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 17 Jun 2010 - 13:43:19 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