On 10/7/07, Adrian Dusa <[EMAIL PROTECTED]> wrote:
> On Sunday 07 October 2007, Gabor Grothendieck wrote:
> > I thought the latest zoo fixes were on CRAN but perhaps they
> > are not.   Try this:
> >
> > library(zoo)
> > # next line loads latest version of merge.zoo (fixed in August)
> > source("http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/*checkout*/
> >pkg/R/merge.zoo.R?rev=361&root=zoo")
> >
> > as.vector(time(do.call(merge, c(lapply(aa, function(x) zoo(,x)), all =
> > FALSE))))
>
> Yeap, that fixes it.
> Ah-haa, so all = FALSE is merge()s argument...
> Neat :)
> Adrian

It also makes use of the fact that zoo is sufficiently general that the
times in the time series can be character strings.  For example, the
following time series has the value 1 at time "a", 2 at time "b", etc.

zoo(1:26, letters)

______________________________________________
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