Skip to content
Prev 49571 / 63424 Next

Reimplement stats:::plotNode as iterative to avoid recursion limits?

Hi All,

I've gotten a number of reports from users about gplots::heatmap.2 generating 'node stack overflow' errors.  As it turns out, these errors originate in stats:::plotNode, and are triggered when it is passed a dendrogram that is too deeply nested.

While increasing the stack size (which is a compile-time option for byte coded functions) can allow a particular instance to succeed, a better solution would be to modify stats:::plotNode to use a recursive, rather than iterative algorithm.

Anyone want to take this up as a programming challenge?   

-Greg