[R] working with zoo time index ??

Gabor Grothendieck ggrothendieck at gmail.com
Thu Jun 17 17:38:58 CEST 2010


On Thu, Jun 17, 2010 at 7:38 AM, skan <juanpide at gmail.com> 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.



More information about the R-help mailing list