Skip to content
Prev 212996 / 398500 Next

A list of data.frames merged together

Hello,

I have for a long list of data.frames that I would like to get merged.
Each data.frame have two columns with the same names (Date and Value).
What I would like is for the objects in the list to be merged on Only
date with the column header being the name in the list.

For example

A <- data.frame(Date=c("03/15/10","04/15/10","05/15/10"),
Value=c(1,2,3))
B <- data.frame(Date=c("03/15/10","04/15/10","06/15/10"),
Value=c(5,5,5))
...

yoda <- list(A=A,B=B,...)

Result:

Date		A	B	C
03/15/10	1	5	...
04/15/10	2	5
05/15/10	3	NA
06/15/10	NA	5

Any ideas? I have been fiddling around with plyr and reshape without success

Thanks

Dan