[R] list matching
ggrothendieck at gmail.com
Sun Oct 7 19:09:34 CEST 2007
On 10/7/07, Adrian Dusa <dusa.adrian at gmail.com> 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*/
> > 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 :)
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.
More information about the R-help