Which node is a leaf?

Share:

Description

Gives a vector as the number of nodes (nnodes), which gives a TRUE when a node is a leaf.

Usage

1
which_leaf(dend, ...)

Arguments

dend

a dendrogram dend

...

ignored.

Value

A logical vector with the length of nnodes, which gives a TRUE when a node is a leaf.

See Also

noded_with_condition, is.leaf, nnodes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 

library(dendextend)

# Getting the dend dend
set.seed(23235)
ss <- sample(1:150, 10 )
dend <- iris[ss,-5] %>% dist %>% hclust %>% as.dendrogram
dend %>% plot

which_leaf(dend)


## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.