Re: [R] Collecting output from terminal nodes in a recursion tree

2008-09-26 Thread James Muller
Why not have the return values of each instance of the function be: a) list containing only the current value if terminal node b) concatenated list of returned values from functions if not terminal node (and hence call other functions) My thought is the way you've set this up won't be efficie

[R] Collecting output from terminal nodes in a recursion tree

2008-09-26 Thread B Q
I have a recursive function. The recursion forms a tree with many (millions) terminal nodes. The function must output a value (say, a number or a vector) from each terminal node. At the end, when all recursion is done, we want to collect all the output values. How can that be done cleanly and ef