[R] Merge more than 2 dataframe

Vasilchenko Aleksander vasilchenko.a.p at gmail.com
Mon Dec 17 17:03:54 CET 2012


Hello.
I have for example 4 or more dataframe which like such this example:
  date      value
 2006-11 0.4577647
 2006-12       NaN
 2006-10 0.1577647
 2006-11 0.3577647
 2006-12       NaN
 2007-01       NaN
 2007-02       NaN
 2007-03 0.2956429
 2007-01 0.3677647
 2007-02       NaN
 They have the same length. I need merge by date undefined number of
dataframes. End result output will look like such example
  date      name1          name2      name3         name4   ....
 2006-11 0.4577647     0.4577647   0.4577647  NaN
 2006-12       NaN        NaN           0.4577647  0.4577647
 2006-10 0.1577647     0.1577647   0.4577647  NaN
 2006-11 0.3577647     0.8577647   0.4577647  0.4577647
 2006-12       NaN        0.1577647   0.4577647  0.4577647
 2007-01       NaN        0.2277647   NaN           0.1777647
 2007-02       NaN        0.4577647   0.4577647  0.4477647
 2007-03 0.2956429     NaN            0.4577647  0.1577647
 2007-01 0.3677647     0.4577647   NaN7         0.4577647
 2007-02       NaN        0.6577647   0.4577647  0.4577647

Sincerely yours,
Aleksander



More information about the R-help mailing list