How to get children for each internal node in R?

382 Views Asked by At

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

1

There are 1 best solutions below

0
On

The function identify() allows you to cut the tree and extract the children using the mouse. From ?identify.hclust:

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

Click the 2nd mouse button to terminate.