Ok,

I'm a bit confused by what you mean by "regularly spaced"
After I do the  do.call I do get a data structure with all the times present
and every time has a NA or a data value.

Steve

On Sun, Aug 8, 2010 at 2:46 AM, Gabor Grothendieck
<ggrothendieck@gmail.com>wrote:

> On Sun, Aug 8, 2010 at 2:01 AM, steven mosher <moshersteven@gmail.com>
> wrote:
> > In the real data the months are all complete, but the years can be
> missing.
> > So years can be missing up front, in the middle, at the end. but if a
> year
> > is present than every month has a value or NA.
> > To create regular R ts I had to plow through the data frame, collect a
> year
> > caluculate an index to put it into the final time series.
> >
> > I had tried zoo out and it handled the irregular spaced data, but a large
> > data structure of zoo objects had stumped me. espcially since I need to
> do
> > matching and selecting
> > of the zoo objects.
> > In the real data, there are about 7000 time series of 1500 months and
> those
> > 7000
> > get averaged and combined in different ways
>
> If there are missing years and you want to get a regularly spaced
> series out then use the zoo version of f (rather than the ts version of f)
> and if this is the last statement (same as before but assigning
> it to the variable z):
>
>   z <- do.call(cbind, by(Data, Data$Index, f))
>
> then to get a regularly spaced ts object just do this:
>
>   as.ts(z)
>
> or
>
>   as.zooreg(as.ts(z))
>
> to create a regularly spaced zooreg object.
>

	[[alternative HTML version deleted]]

