Skip to content
Prev 255777 / 398506 Next

merging 2 frames while keeping all the entries from the "reference" frame

On Mon, Apr 4, 2011 at 1:09 PM, Dimitri Liakhovitski
<dimitri.liakhovitski at gmail.com> wrote:
It might make more sense to put each group into its own column since
then the object is a multivariate time series:
Group1    Group2
2008-12-29 2.0266215        NA
2009-01-05        NA        NA
2009-01-12 1.0255344        NA
2009-01-19 1.3880938 0.8135788
2009-01-26 1.4380978 1.6068682
2009-02-02 1.1764965        NA
2009-02-09 1.1578531 1.4484447
2009-02-16 0.6673568 1.4760864

although if you really need to you could string them out like this:

library(reshape2)
melt(data.frame(time(z), coredata(z)), id = 1)