[R] how to add list to a list in iterative manner without mixing content

saverio vicario saverio.vicario at yale.edu
Fri Mar 24 19:42:18 CET 2006


I have a function that generated list and then from those I need to 
do some repeated calculation.  So I was thinking to put them in 
another list and call them one after the other.  Given that I have 20 
of those it was a bit annoying to typing all of them in one command. 
So I need something to do a recursive addition of a list objet to a 
list
here a small size example
A<-list()
D<-list(a=4, b=2)
C<-list(a=3, b=4)
I would like to this but without typing D and C
A<-list(D,C)
A
Something like where I add new object list to the big list, but 
without that the element got mixed across my sublist as when I type :
A<-c(A,D)
A<-c(A,C)
A




More information about the R-help mailing list