Re: [R] List of Lists by for Loop

2014-07-15 Thread PIKAL Petr
Hi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Munjal Patel Sent: Monday, July 14, 2014 8:45 PM To: r-help@r-project.org Subject: [R] List of Lists by for Loop Dear Experts, I have a one more doubt about making list

Re: [R] List of Lists in For Loop

2014-07-15 Thread Adams, Jean
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()

[R] List of Lists by for Loop

2014-07-14 Thread Munjal Patel
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

[R] List of Lists in For Loop

2014-07-14 Thread Munjal Patel
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