Re: [R] A list of data.frames merged together

2010-03-09 Thread Phil Spector
Daniel - Reduce may be handy here: ans = Reduce(function(a,b)merge(a,b,by=1),yoda) names(ans)[2:ncol(ans)] = names(yoda) - Phil Spector Statistical Computing Facility Depa

Re: [R] A list of data.frames merged together

2010-03-09 Thread Gabor Grothendieck
This will do it: > merge(A, B, by = 1, all = TRUE) Date Value.x Value.y 1 03/15/10 1 5 2 04/15/10 2 5 3 05/15/10 3 NA 4 06/15/10 NA 5 but you probably really want to be using time series for this so that you can easily perform other operations t

[R] A list of data.frames merged together

2010-03-09 Thread Daniel Brewer
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