I have two xts objects, call them "a" and "b", and am trying to merge them...
> class(a)
[1] "xts" "zoo"
> class(b)
[1] "xts" "zoo"
> head(a)
2010-04-01  7.6343
2010-04-02  7.6343
2010-04-03  7.5458
2010-04-04  7.4532
2010-04-05  7.4040
2010-04-06  7.3317
> head(b)
2010-04-01     568.80
2010-04-05     571.01
2010-04-06     568.22
2010-04-07     563.54
2010-04-08     567.49
2010-04-09     566.22
> head(cbind(a,b))
2010-04-01     568.80      NA
2010-04-01         NA  0.3998
2010-04-02         NA  0.3998
2010-04-03         NA  0.3999
2010-04-04         NA  0.3994
2010-04-05     571.01      NA
> q()
I'd like the cbind'ed version to look like:
2010-04-01     568.80    0.3998
2010-04-02         NA  0.3998
2010-04-03         NA  0.3999
2010-04-04         NA  0.3994
2010-04-05     571.01      0.3991

What gives? Many thanks, in advance. -- H

-- 
Sent from my mobile device
Envoyait de mon telephone mobil

______________________________________________
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