The R Project SVN R

Rev

Rev 61160 | Rev 67599 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 61160 Rev 61168
Line 16... Line 16...
16
  restrictions imposed by the dendrogram is carried out.
16
  restrictions imposed by the dendrogram is carried out.
17
}
17
}
18
\usage{
18
\usage{
19
heatmap(x, Rowv = NULL, Colv = if(symm)"Rowv" else NULL,
19
heatmap(x, Rowv = NULL, Colv = if(symm)"Rowv" else NULL,
20
        distfun = dist, hclustfun = hclust,
20
        distfun = dist, hclustfun = hclust,
21
        reorderfun = function(d,w) reorder(d,w),
21
        reorderfun = function(d, w) reorder(d, w),
22
        add.expr, symm = FALSE, revC = identical(Colv, "Rowv"),
22
        add.expr, symm = FALSE, revC = identical(Colv, "Rowv"),
23
        scale = c("row", "column", "none"), na.rm = TRUE,
23
        scale = c("row", "column", "none"), na.rm = TRUE,
24
        margins = c(5, 5), ColSideColors, RowSideColors,
24
        margins = c(5, 5), ColSideColors, RowSideColors,
25
        cexRow = 0.2 + 1/log10(nr), cexCol = 0.2 + 1/log10(nc),
25
        cexRow = 0.2 + 1/log10(nr), cexCol = 0.2 + 1/log10(nc),
26
        labRow = NULL, labCol = NULL, main = NULL,
26
        labRow = NULL, labCol = NULL, main = NULL,
Line 44... Line 44...
44
    between both rows and columns.  Defaults to \code{\link{dist}}.}
44
    between both rows and columns.  Defaults to \code{\link{dist}}.}
45
  \item{hclustfun}{function used to compute the hierarchical clustering
45
  \item{hclustfun}{function used to compute the hierarchical clustering
46
    when \code{Rowv} or \code{Colv} are not dendrograms.  Defaults to
46
    when \code{Rowv} or \code{Colv} are not dendrograms.  Defaults to
47
    \code{\link{hclust}}. Should take as argument a result of \code{distfun}
47
    \code{\link{hclust}}. Should take as argument a result of \code{distfun}
48
    and return an object to which \code{\link{as.dendrogram}} can be applied.}
48
    and return an object to which \code{\link{as.dendrogram}} can be applied.}
49
  \item{reorderfun}{function(d,w) of dendrogram and weights for
49
  \item{reorderfun}{\code{function(d, w)} of dendrogram and weights for
50
    reordering the row and column dendrograms.  The default uses
50
    reordering the row and column dendrograms.  The default uses
51
    \code{\link{reorder.dendrogram}}.}
51
    \code{\link{reorder.dendrogram}}.}
52
  \item{add.expr}{expression that will be evaluated after the call to
52
  \item{add.expr}{expression that will be evaluated after the call to
53
    \code{image}.  Can be used to add components to the plot.}
53
    \code{image}.  Can be used to add components to the plot.}
54
  \item{symm}{logical indicating if \code{x} should be treated
54
  \item{symm}{logical indicating if \code{x} should be treated
Line 151... Line 151...
151
        main = "heatmap(<Mtcars data>, ..., scale = \"column\")")
151
        main = "heatmap(<Mtcars data>, ..., scale = \"column\")")
152
\testonly{
152
\testonly{
153
## no row dendrogram (nor reordering) at all:
153
## no row dendrogram (nor reordering) at all:
154
heatmap(x, Rowv = NA, col = cm.colors(256), scale = "column",
154
heatmap(x, Rowv = NA, col = cm.colors(256), scale = "column",
155
        ColSideColors = cc, margins = c(5,10),
155
        ColSideColors = cc, margins = c(5,10),
156
        xlab = "xlab", ylab =  "ylab")# no main
156
        xlab = "xlab", ylab =  "ylab")  # no main
157
}
157
}
158
## "no nothing"
158
## "no nothing"
159
heatmap(x, Rowv = NA, Colv = NA, scale = "column",
159
heatmap(x, Rowv = NA, Colv = NA, scale = "column",
160
        main = "heatmap(*, NA, NA) ~= image(t(x))")
160
        main = "heatmap(*, NA, NA) ~= image(t(x))")
161
%% also want example using the `add.exp' argument!
161
%% also want example using the `add.exp' argument!