Works wonderfully. I am very happy that I eventually found this post :)
Daniel.
--
View this message in context:
http://r.789695.n4.nabble.com/rbind-with-different-columns-tp907370p2263588.html
Sent from the R help mailing list archive at Nabble.com.
___
Karl Ove Hufthammer wrote:
In article <4addc1d0.2040...@yahoo.de>, niederlein-rs...@yahoo.de
says...
In every list entry is a data.frame but the columns are only partially
the same. If I have exactly the same columns, I could do the following
command to combine my data:
do.call("rbind", myLis
Nice! I was going to recommend
merge(merge(myList[[1]], myList[[2]], all=TRUE, sort=FALSE),
myList[[3]], all=TRUE, sort=FALSE)
but rbind.fill is better.
-Ista
On Tue, Oct 20, 2009 at 10:05 AM, Karl Ove Hufthammer wrote:
> In article <4addc1d0.2040...@yahoo.de>, niederlein-rs...@yahoo.de
> says
In article <4addc1d0.2040...@yahoo.de>, niederlein-rs...@yahoo.de
says...
> In every list entry is a data.frame but the columns are only partially
> the same. If I have exactly the same columns, I could do the following
> command to combine my data:
>
> do.call("rbind", myList)
>
> but of cour
Hello there,
with the following dummy code I'd like to give you an idea how my data
looks like:
df1 <- data.frame(a = rnorm(10), b = rnorm(10))
df2 <- data.frame(a = rnorm(10), c = rnorm(10))
df3 <- data.frame(a = rnorm(10), b = rnorm(10), c = rnorm(10))
myList <- list(df1, df2, df3) # (myLis
5 matches
Mail list logo