Ive moved on to a new server and Installed R version 3.0 on it. (gplots library was no longer available for 2.14)
Using a script that worked for version 2.14 I now e
I'm the author of the gplots package. The 'node stack overflow' error occurs when a byte-compiled function has too many recursive calls.
In this case, it occurs because the function that plots dendrogram objects (stats:::plotNode) is implemented using a recursive algorithm and the dendrogram object is deeply nested.
Ultimately, the correct solution is to modify plotNode to use an iterative algorithm, which will prevent the recursion depth error from occuring.
In the short term, it is possible to force stats:::plotNode to be run as interpreted code rather then byte-compiled code via a nasty hack.
Here's the recipe:
## Convert a byte-compiled function to an interpreted-code function
unByteCode <- function(fun)
{
FUN <- eval(parse(text=deparse(fun)))
environment(FUN) <- environment(fun)
FUN
}
## Replace function definition inside of a locked environment **HACK**
assignEdgewise <- function(name, env, value)
{
unlockBinding(name, env=env)
assign( name, envir=env, value=value)
lockBinding(name, env=env)
invisible(value)
}
## Replace byte-compiled function in a locked environment with an interpreted-code
## function
unByteCodeAssign <- function(fun)
{
name <- gsub('^.*::+','', deparse(substitute(fun)))
FUN <- unByteCode(fun)
retval <- assignEdgewise(name=name,
env=environment(FUN),
value=FUN
)
invisible(retval)
}
## Use the above functions to convert stats:::plotNode to interpreted-code:
unByteCodeAssign(stats:::plotNode)
## Now raise the interpreted code recursion limit (you may need to adjust this,
## decreasing if it uses to much memory, increasing if you get a recursion depth error ).
options(expressions=5e4)
## heatmap.2 should now work properly
heatmap.2( ... )