Skip to content
Prev 274765 / 398506 Next

Function in nested loop

Without knowing the calculation you want to run, I can't give you any
more direction than this, but it sounds like you need to take a step
back and rethink your problem in terms of vectorization. If you can do
so, outer() might be able to help as well as direct vectorwise
calculation.

If it's entirely impossible to vectorize, how about putting all the
different options in lists and looping over those? (Though I can't
believe I just suggested 5 nested loops in R! the shame...)

Michael
On Tue, Oct 18, 2011 at 3:28 AM, Eekhout, I. <i.eekhout at vumc.nl> wrote: