as.hclust(x, ...) as.hclust.twins(x)
x |
Hierarchical clustering object |
Converts objects from other hierarchical clustering functions to
class "hclust". Currently there is only support for
converting objects of class "twins" as produced by the
functions diana() and agnes() from the package
`cluster'.
An object of class "hclust".
hclust,diana,agnes
x <- matrix(rnorm(30), ncol=3)
hc <- hclust(dist(x), method="complete")
library(cluster)
ag <- agnes(x, method="complete")
x11()
par(mfrow=c(1,2))
plot(hc)
mtext("hclust", side=1)
plot(as.hclust(ag))
mtext("agnes", side=1)