Rev 15465 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{as.hclust}\alias{as.hclust}\alias{as.hclust.twins}\title{Convert Objects to Class hclust}\usage{as.hclust(x, ...)as.hclust.twins(x, ...)}\arguments{\item{x}{Hierarchical clustering object}\item{\dots}{further arguments passed to or from other methods.}}\description{Converts objects from other hierarchical clustering functions toclass \code{"hclust"}.}\details{Currently there is only support for converting objects ofclass \code{"twins"} as produced by the functions \code{diana} and\code{agnes} from the package \file{cluster}.}\value{An object of class \code{"hclust"}.}\seealso{\code{\link{hclust}}, \code{\link[cluster]{diana}},\code{\link[cluster]{agnes}}}\examples{\dontrun{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)}}\keyword{multivariate}\keyword{cluster}