Munjal, Something like this should work:
Digits = c(20, 30, 40, 50, 60) result = vector(length(Digits), mode="list") names(result) = Digits for(j in seq(Digits)) { a = vector(Digits[j], mode="list") b = vector(Digits[j], mode="list") for(i in 1:Digits[j]) { #Do Calculation a[[i]] = data.frame(####) b[[i]] = data.frame(####) } result[[j]] = list(a, b) } Jean On Mon, Jul 14, 2014 at 1:35 PM, Munjal Patel <munjalpate...@gmail.com> wrote: > Dear Experts, > I have a one more doubt about making list of lists. > Here is the simple code i have made. > I am doing the following for only one digit=20 > a=vector(20,mode="list") > b=vector(20,mode="list") > for (i in 1:20){ > #Do Calculation > a[[i]]=data.frame(####) > b[[i]]=data.frame(####) > } > Now i have to repeat the whole process for Digits=c(30,40,50,60) > In short I want the Master list containing following > List 1(#20) > List a > List b > > List 2(#30) > List a > List b > > ........so on > Can you please guide me in this ? > Thank you very much. > Sincerely > > -- > Munjal > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. > [[alternative HTML version deleted]] ______________________________________________ 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.