r define nested empty list code example
Example: r define nested empty list
my.list<-lapply(my.list<-vector(mode = 'list',5),function(x) # 1st level with 5 objects
x<-lapply(x<-vector(mode = 'list',3),function(x) # 2nd level with 3 nested objects
x<-vector(mode='list',2))) # 3rd level with 2 nested objects