This still does not give me the desired behavior:

> z = zoo(x, order.by=t, frequency=24)
> t = as.ts(z)
... inserts 23 NA values between every actual value. This is not correct;
the original data has a frequency of 24 and doesn't need one forced upon it
during coercion.
> z = zoo(x, order.by=t)
> t = as.ts(z)
... obviously doesn't give me a ts with frequency 24.

Keep in mind that I'm trying to get a ts with frequency 24 so I can feed it
to stl. I haven't yet found a sequence of operations that lets me do this.
Any ideas?


On Wed, Jan 19, 2011 at 12:00 PM, Gabor Grothendieck <
ggrothendi...@gmail.com> wrote:

> On Wed, Jan 19, 2011 at 1:10 PM, Adam Oliner <oli...@gmail.com> wrote:
> > I don't seem to have that method:
> >
> >> zts = as.ts.zoo(z)
> > Error: could not find function "as.ts.zoo"
> >
> > I'm finding forum posts from people trying to use stl directly with
> zoo[reg]
> > functions (despite the documentation specifying ts) but discovering that
> stl
> > gives errors with NA entries. I encountered similar errors.
> >
> > Can anyone on this list confirm whether stl works with NA values? If so,
> > could someone please point me to a working example?
> >
> >
>
> Normally S3 methods such as as.ts.zoo are not exported unless there is
> particular reason to access them directly.  Rather one accesses them
> via their generic which dispatches the appropriate method based on the
> class of its first argument.
>
> That is if z is a zoo object then as.ts(z) dispatches as.ts.zoo.
>
> If you really want to see it you can do this zoo:::as.ts.zoo
>
> --
> Statistics & Software Consulting
> GKX Group, GKX Associates Inc.
> tel: 1-877-GKX-GROUP
> email: ggrothendieck at gmail.com
>



-- 
 - Adam J. Oliner

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to