Re: [R] Generation of missiing values in a time serie...

From: Alvaro Saurin <saurin_at_dcs.gla.ac.uk>
Date: Fri 16 Dec 2005 - 05:33:50 EST

On 13 Dec 2005, at 20:06, Gabor Grothendieck wrote:

> In thinking about this some more, the trick I discussed is
> probably not the best way to do it since its possible that
> in the future zoo will completely disallow illegal zoo objects.
> I think a better way might be to construct it like this:
>
>
> aggregate(zoo(z.data), round(z.time, 1), tail, 1)
>
> where z.data is the matrix and z.time are the times. The variable
> z, which is an illegal zoo object, would not be created but in terms
> of z, since that is what I have reproducibly from your post, we have:
>
> z.data <- coredata(z)
> z.time <- time(z)

Thanks for your help. However, I have finally implemented a solution by myself, using a loop that iterates over the original serie. I haven't been able to find a way of using these functions and generating a regular time serie in the way I wanted. Thanks anyway.

Alvaro

-- 
Alvaro Saurin <alvaro.saurin@gmail.com> <saurin@dcs.gla.ac.uk>

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Dec 16 05:35:05 2005

This archive was generated by hypermail 2.1.8 : Fri 16 Dec 2005 - 09:45:39 EST