I am using a library which calls the function to a dendrogram object dend
positiveheights = function(x){
if (attributes(x)$height < 0) {
attributes(x)$height = 0.0001
}
x
}
dend = dendrapply(dend, positiveheights)
This returns
Error: C stack usage 15944436 is too close to the limit
> dend
'dendrogram' with 2 branches and 2039 members total, at height 10.01118
I'm aware of a previous question which had this issue, which was caused by infinite recursion when the nodes where not being returned from the function. However, that doesn't seem to be the cause here since the function returns the node x
.
What might be causing this issue?