> From: newrnew...@hotmail.com
> To: r-help@r-project.org
> Date: Mon, 11 May 2015 20:16:40 +0000
> Subject: [R] binding two lists of lists of dataframes together
> 
>  Hi, 
> I'm new to R and am stumped.  I'm trying to bind List 1 to List 2 and have 
> the corresponding Output.  
>  
> I've found the following code - I can't say I understand 
> rbindlist(lapply(list12, "[", i, TRUE)).  Either way - it doesn't give 
> exactly what's needed.
>  
> library(data.table)
> list12 <- list(List1,List2)
> nr <- as.vector(nrow(list12[[1]]))
> fastbind.ith.rows <- function(i) rbindlist(lapply(list12, "[", i, TRUE))
> fastbound <- lapply(1:nr, fastbind.ith.rows)
>  
> It produces Output 2 - where dataframes are grouped together by rownames, but 
> keeps 2 separate vectors - vs. binding the two into 1 vector.
>  
> Any help/guidance would be greatly appreciated!!
>  
> Thanks!
> Vince
>  
                                          

Attachment: data.pdf
Description: Adobe PDF document

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to