简体   繁体   English

如何为R中的每个内部节点获取子代?

[英]How to get children for each internal node in R?

For the dendrogram object how can I get children of the internal nodes? 对于树状图对象,如何获得内部节点的子级? Ideally I would like to extract children with their labels. 理想情况下,我想提取带有标签的孩子。

thank you 谢谢

The function identify() allows you to cut the tree and extract the children using the mouse. 函数identify()允许您切割树并使用鼠标提取孩子。 From ?identify.hclust: 来自?identify.hclust:

  hca <- hclust(dist(USArrests))
  plot(hca)
  (x <- identify(hca))

Click the 2nd mouse button to terminate. 单击第二个鼠标按钮以终止。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM