> I am not able to figure out why. Does anyone know what could be done to fix
> it?
>
> TIA, Mark
>
>
> Original-Nachricht
> > Datum: Mon, 29 Dec 2008 16:17:22 -0200
> > Von: "Henrique Dallazuanna"
> > An: "Mark Heckmann&
Or even more simply:
On Mon, Dec 29, 2008 at 12:17 PM, Henrique Dallazuanna wrote:
> Try this:
>
> do.call(rbind, lapply(l, "[", unique(unlist(sapply(l, names)
>
> Where "l" is your list.
Or even more simply:
library(plyr)
do.call(rbind.fill, l)
which doesn't get the variable order quite r
> An: "Mark Heckmann"
> CC: r-help@r-project.org
> Betreff: Re: [R] Merge or combine data frames with missing columns
> Try this:
>
> do.call(rbind, lapply(l, "[", unique(unlist(sapply(l, names)
>
> Where "l" is your list.
Try this:
do.call(rbind, lapply(l, "[", unique(unlist(sapply(l, names)
Where "l" is your list.
On Mon, Dec 29, 2008 at 12:18 PM, Mark Heckmann wrote:
>
> Hi R-experts,
>
> suppose I have a list with containing data frame elements:
>
> [[1]]
> (Intercept) y1 y2 y3
How about this solution
g1 <- data.frame(ic = 1, y1 = 2, y2 = 3, y3 = 4, y4 = 5)
g2 <- data.frame(ic = 2, y2 = 6, y3 = 7)
g <- list(g1, g2)
library(gregmisc)
do.call(smartbind, g)
-Lauri
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
On Mon, 29 Dec 2008, Mark Heckmann wrote:
Hi R-experts,
suppose I have a list with containing data frame elements:
[[1]]
(Intercept) y1 y2 y3 y4
-6.64 0.761 0.383 0.775 0.163
[[2]]
(Intercept) y2 y3
-3.858
Mark,
I think ?rbind should work for you.
Regards,
Brian
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Mark Heckmann
Sent: Monday, December 29, 2008 9:18 AM
To: r-help@r-project.org
Subject: [R] Merge or combine data frames
Hi R-experts,
suppose I have a list with containing data frame elements:
[[1]]
(Intercept) y1 y2 y3 y4
-6.64 0.761 0.383 0.775 0.163
[[2]]
(Intercept) y2 y3
-3.858 0.854 0.834
N
8 matches
Mail list logo