Skip to content
Prev 82695 / 398503 Next

Generation of missiing values in a time serie...

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)
On 12/13/05, Gabor Grothendieck <ggrothendieck at gmail.com> wrote: