Hi Vin,
If I read your "Output (Wanted)" section correctly, you want a new
list in which each element is the concatenation of the corresponding
elements of the original two. If so, maybe this shorter example will
help:

list1<-list(id=as.data.frame(matrix(rep(c(563,623,581),3),nrow=3,byrow=TRUE)),
 wgtband=as.data.frame(matrix(0,nrow=3,ncol=3,byrow=TRUE)))
list2<-list(id=as.data.frame(matrix(c(217,120,372,125,334,86,130,349,576),nrow=3,byrow=TRUE)),
 wgtband=as.data.frame(matrix(rep(1:3,each=3),nrow=3)))
list3<-list()
for(i in 1:length(list1)) list3[[i]]<-cbind(list1[[i]],list2[[i]])
names(list3)<-names(list1)
list3

Jim

______________________________________________
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