dendrapply
Apply a Function to All Nodes of a Dendrogram

### Description

Apply a function to all nodes of a dendrogram recursively.

### Usage

    dendrapply(X, FUN, ...)

### Arguments

X | object inherits from class "dendrogram".
FUN | a function name, applied to all nodes of X.
... | additional arguments to be passed to or from function FUN.

Value
Returns a list, components are composed with all node of X.
See Also
dendrogram, reorder.dendrogram.
Examples

    hc.fit <- hclust(dist(c(12, 2, 5, 4, 3)))
    dendr.fit <- as.dendrogram(hc.fit)
    ts.fit <- dendrapply(dendr.fit, ts)
    x.mat <- matrix(1:9, 3)
    y.mat <- hclust(dist(x.mat))
    dendr.mat <- as.dendrogram(y.mat)
    dendrapply(dendr.mat, class)

Package stats version 6.1.5-18
Package Index