\name{align}
\alias{align}
\alias{align.default}
\alias{compare}
\alias{compare.default}
\title{ Cluster aligning/comparing }
\description{
  Aligns or compares objects that are clusterings or contain clusterings
}
\synopsis{
 align(obj, \dots)
 compare(obj, \dots)
}
\usage{
align.default(obj, refobj, method = c("heuristic", "truematch", "tracemax")[1], \dots)
compare.default(obj, method = c("heuristic", "truematch", "tracemax")[1], \dots)
}
\arguments{
  \item{obj}{ object being or containing a clustering }
  \item{refobj}{ an object which defines how to align }
  \item{obj2}{ an object to compare with (columns of table) }
  \item{method}{ one of c("heuristic","truematch","tracemax"), see \code{\link{matchindex}} }
  \item{\dots}{ further arguments depending on class method }
}
\value{
  Function \code{align} returns an aligned object (clustering or object containing a clustering)
  Function \code{compare} returns an aligned table
}
\author{ Jens Oehlschlägel }
\seealso{ \code{\link{matchindex}} }

\examples{
 x <- c(1,1,2,2,3,3)
 y <- c(2,2,3,3,1,1)
 table(x, y)
 align(y, x)
 table(x, align(y,x))
 compare(x, y)
}
\keyword{ utilities }
\keyword{ cluster }
