[R-sig-Geo] Recursive user-defined methods in R scripts - upper bound on nested calls?
B.Rowlingson at lancaster.ac.uk
Mon May 9 23:04:55 CEST 2005
Rick Reeves wrote:
> The question: Has anyone explored the limits of
> recursive R function calls? I coded the recursive
> method to have a minimal run-time memory footprint.
There's a limit on how deep expressions can go:
but this usually gives an error when it goes too far:
Error in recurse(n - 1) : evaluation nested too deeply: infinite
recursion / options(expression=)?
> Is there a way to ask for more resources (stack space)
> in the R run-time environment?
Might not explain why your code dies silently, unless the error is being
trapped inside a 'try'...
More information about the R-sig-Geo