dendrapply(X, FUN, ...)
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. |
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)