Without any error checking, I'd try this: recurse <- function(l1,l2){ if(is(l1[[1]],"list")) mapply(recurse,l1,l2,SIMPLIFY=F) else {mapply(c,l1,l2,SIMPLIFY=F)} }
recurse(list.1,list.2) which recursively traverses each tree (list) in tandem until one is not composed of lists and then concatenates. If the structure of the lists does not agree, this will fail. Regards, David Katz da...@davidkatzconsulting.com -- View this message in context: http://r.789695.n4.nabble.com/list-concatenation-tp3209182p3209324.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list 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.