\Header{as.hclust}{Convert Objects to Class hclust}
\methalias{as.hclust.twins}{as.hclust}
\keyword{multivariate}{as.hclust}
\keyword{cluster}{as.hclust}
\begin{Description}\relax
Converts objects from other hierarchical clustering functions to
class \code{"hclust"}.\end{Description}
\begin{Usage}
\begin{verbatim}
as.hclust(x, ...)
as.hclust.twins(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] Hierarchical clustering object
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Currently there is only support for converting objects of
class \code{"twins"} as produced by the functions \code{diana} and
\code{agnes} from the package \file{cluster}.\end{Details}
\begin{Value}
An object of class \code{"hclust"}.\end{Value}
\begin{SeeAlso}\relax
\code{\Link{hclust}}, \code{\Link{diana}},
\code{\Link{agnes}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

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)

\end{ExampleCode}
\end{Examples}

