Hi all,

I think I have some problems to use correctly the function dendrapply.
Let suppose dend is a dendrogram object.
I would likde to know the cardinal number of leaves depending of each
node of the tree dend.

It is right that the command attr(dend,"members") gives the total number of leaves, and
attr(dend[[1]],"members") gives the number of leaves for the first left node and so on...


Now to obtain the number of leaves for each node, I tried the function dendrapply :
dendrapply(dend, function(x){attr(x,"members")})


but this command  does not give me the result I serach. Could you help me.

Best regards,
Olivier.

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to