Skip to content
Prev 276429 / 398506 Next

nested "for" loops

Your problem is that you redefine l each time through the loops and
don't record old values; you could do so by using c() for
concatenation, but perhaps this is what you are looking for:

exp(rowSums(log(expand.grid(V1, V2, V3))))

Hope this helps,

Michael
On Fri, Nov 4, 2011 at 7:49 PM, nick_pan <nick_pan88 at yahoo.gr> wrote: