[R] temporal join

Gabor Grothendieck ggrothendieck at gmail.com
Sat Mar 14 11:04:15 CET 2009


Sorry there was some garbage at the beginning.  Should just
be:

On Sat, Mar 14, 2009 at 6:03 AM, Gabor Grothendieck
<ggrothendieck at gmail.com> wrote:
> If its truly 1-1, i.e. they have the same number of comonents and
> the i-th component of the first series corresponds to the i-th
> component of the second seriesm, then just cbind their data and
> use the times of the first series, say:
>
> library(zoo)
> library(chron)
>
> # test data
> x <- zoo(1:3, as.chron("2000-01-01 18:12:00") + 0:2)
> y <- zoo(4:6, time(x) + 0.1)
>
> zoo(cbind(coredata(x), coredata(y)), time(x))
>




More information about the R-help mailing list