I have a dataset as follows and my goal is to cbind each of these dataframes (df1,df2, and df3) by the Date:
df1
Date COL1
2015-05-27 5
2015-05-28 7
2015-05-29 8
2015-05-30 7
2015-05-31 4
2015-06-01 8
df2
Date COL2
2015-05-28 6
2015-05-29 9
2015-05-30 10
2015-05-31 11
2015-06-01 12
df3
Date COL3
2015-01-01 12
2015-01-02 8
.
.
.
.
2015-06-01 20
I want to cbind these so that it is by Date. Regular cbind doesn't work because it has different number of rows. And when I do cbind.fill, the NA's extend past the dataframe even when I use all.x=TRUE
So the end result should look like this:
Date COL3 COL2 COL1
2015-01-01 12 NA NA
2015-01-02 8 NA NA
. . . .
. . . .
. . . .
. . . .
2015-05-31 12 11 4
2015-06-01 20 12 8
Any help would be great, thanks!