Thanks a lot, Pratap!
Dimitri
On Mon, Feb 4, 2013 at 9:43 AM, nalluri pratap wrote:
> Just modified your code a bit, hope this helps:
>
> a=expand.grid(1:2,1:2)
> b=expand.grid(1:2,1:2,1:2)
> c=expand.grid(1:2,1:2,1:2,1:2)
> l.long<-list(a,b,c)
> mygrid<-do.call(expand.grid,lapply(l.long,funct
Just modified your code a bit, hope this helps:
a=expand.grid(1:2,1:2)
b=expand.grid(1:2,1:2,1:2)
c=expand.grid(1:2,1:2,1:2,1:2)
l.long<-list(a,b,c)
mygrid<-do.call(expand.grid,lapply(l.long,function(x) 1:nrow(x)))
out<-vector("list",nrow(mygrid))
for(gridrow in 1:nrow(mygrid))
{
sum_rows=0
2 matches
Mail list logo