% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plots-heatmap.r
\name{HeatmapPlot}
\alias{HeatmapPlot}
\title{A heatmap of the comparison of two clustering results.}
\usage{
HeatmapPlot(
  Data1,
  Data2,
  names = NULL,
  nrclusters = NULL,
  cols = NULL,
  plottype = "new",
  location = NULL
)
}
\arguments{
\item{Data1}{The resulting clustering of method 1.}

\item{Data2}{The resulting clustering of method 2.}

\item{names}{The names of the objects in the data sets. Default is NULL.}

\item{nrclusters}{The number of clusters to cut the dendrogram in. Default is NULL.}

\item{cols}{A character vector with the colours for the clusters. Default is NULL.}

\item{plottype}{Should be one of "pdf","new" or "sweave". If "pdf", a
location should be provided in "location" and the figure is saved there. If
"new" a new graphic device is opened and if "sweave", the figure is made
compatible to appear in a sweave or knitr document, i.e. no new device is
opened and the plot appears in the current device or document. Default is "new".}

\item{location}{If plottype is "pdf", a location should be provided in
"location" and the figure is saved there. Default is NULL.}
}
\value{
A heatmap based on the distance matrix created by the function with
the dendrogram of method 2 on top of the plot and the one from method 1 on
the left. The names of the objects are depicted on the bottom in the order
of clustering of method 2 and on the right by the ordering of method 1.
Vertically the cluster of method 2 can be seen while horizontally those of
method 1 are portrayed.
}
\description{
A function to plot a heatmap of the agreement between two clustering
results.

These are the clusters to which a comparison is made. A matrix is set up of
which the columns are determined by the ordering of clustering of method 2
and the rows by the ordering of method 1. Every column represent one object
just as every row and every column represent the color of its cluster. A
function visits every cell of the matrix. If the objects represented by the
cell are still together in a cluster, the color of the column is passed to
the cell. This creates the distance matrix which can be given to the
HeatmapCols function to create the heatmap.
}
\examples{
\dontrun{
data(fingerprintMat)
data(targetMat)
data(Colors1)

MCF7_F = Cluster(fingerprintMat,type="data",distmeasure="tanimoto",normalize=FALSE,
clust="agnes",linkage="flexible",gap=FALSE,maxK=15)
MCF7_T = Cluster(targetMat,type="data",distmeasure="tanimoto",normalize=FALSE,
clust="agnes",linkage="flexible",gap=FALSE,maxK=15)


L=list(MCF7_F,MCF7_T)
names=c("FP","TP")

HeatmapPlot(Data1=MCF7_T,Data2=MCF7_F,names=rownames(fingerprintMat)
,nrclusters=7,cols=Colors1,plottype="new", location=NULL)
}

}
