heatmap.3: A function that creates a dataframe to be used as input to...

Description Usage Arguments Examples

Description

This function given a numeric matrix returns a data frame with the necessary information to create a heatmap with specifics features

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
heatmap.3(x, Rowv = TRUE, Colv = if (symm) "Rowv" else TRUE,
  distfun = dist, hclustfun = hclust, dendrogram = c("both", "row",
  "column", "none"), symm = FALSE, scale = c("none", "row", "column"),
  na.rm = TRUE, revC = identical(Colv, "Rowv"), add.expr, breaks,
  symbreaks = max(x < 0, na.rm = TRUE) || scale != "none",
  col = "heat.colors", colsep, rowsep, sepcolor = "white",
  sepwidth = c(0.05, 0.05), cellnote, notecex = 1, notecol = "cyan",
  na.color = par("bg"), trace = c("none", "column", "row", "both"),
  tracecol = "cyan", hline = median(breaks), vline = median(breaks),
  linecol = tracecol, margins = c(5, 5), ColSideColors, RowSideColors,
  side.height.fraction = 0.3, cexRow = 0.2 + 1/log10(nr), cexCol = 0.2 +
  1/log10(nc), labRow = NULL, labCol = NULL, key = TRUE, keysize = 1.5,
  density.info = c("none", "histogram", "density"), denscol = tracecol,
  symkey = max(x < 0, na.rm = TRUE) || symbreaks, densadj = 0.25,
  main = NULL, xlab = NULL, ylab = NULL, lmat = NULL, lhei = NULL,
  lwid = NULL, NumColSideColors = 1, NumRowSideColors = 1,
  KeyValueName = "Value", ...)

Arguments

x

numeric matrix

Rowv

determines if and how the row dendrogram should be computed and reordered. Either a dendrogram or a vector of values used to reorder the row dendrogram or NA to suppress any row dendrogram (and reordering) or by default, NULL. It is TRUE by default.

Colv

determines if and how the column dendrogram should be reordered. Has the same options as the Rowv argument above and additionally when x is a square matrix, Colv = "Rowv" means that columns should be treated identically to the rows (and so if there is to be no row dendrogram there will not be a column one either). By defaulf: if (symm) "Rowv" else TRUE.

distfun

function used to compute the distance (dissimilarity) between both rows and columns. Defaults to dist.

hclustfun

function used to compute the hierarchical clustering when Rowv or Colv are not dendrograms. Defaults to hclust. Should take as argument a result of distfun and return an object to which as.dendrogram can be applied.

dendrogram

dendrogram and weights for reordering the row and column dendrograms. Defaults to c("both","row", "column", "none").

symm

logical indicating if x should be treated symmetrically; can only be true when x is a square matrix. Defaults on FALSE.

scale

character vector indicating if the values should be centered and scaled in either the row direction or the column direction, or none. The default is c("none","row", "column").

na.rm

logical indicating whether NA's should be removed. Default is TRUE.

revC

= identical(Colv,"Rowv")

add.expr
breaks
symbreaks

= max(x < 0, na.rm = TRUE) || scale != "none"

col

= "heat.colors"

colsep
rowsep
sepcolor

= "white"

sepwidth

= c(0.05, 0.05)

cellnote,
notecex

= 1

notecol

= "cyan"

na.color

= par("bg")

trace

= c("none", "column","row", "both")

tracecol

= "cyan"

hline

= median(breaks)

vline

= median(breaks)

linecol

= tracecol

margins

= c(5,5)

ColSideColors
RowSideColors
cexRow

= 0.2 + 1/log10(nr)

cexCol

= 0.2 + 1/log10(nc)

labRow

= NULL

labCol

= NULL

key

= TRUE

keysize

= 1.5

density.info

= c("none", "histogram", "density")

denscol

= tracecol

symkey

= max(x < 0, na.rm = TRUE) || symbreaks, densadj = 0.25

main

= NULL, xlab = NULL

ylab

= NULL, lmat = NULL

lhei

= NULL, lwid = NULL

NumColSideColors

= 1

NumRowSideColors

= 1

side.height.fraction=0.3
KeyValueName="Value"

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
heatmap.3(x, Rowv = TRUE, Colv = if (symm) "Rowv" else TRUE,
distfun = dist, hclustfun = hclust, dendrogram = c("both","row", "column", "none"),
symm = FALSE, scale = c("none","row", "column"), na.rm = TRUE, revC = identical(Colv,"Rowv"),
add.expr,   breaks,   symbreaks = max(x < 0, na.rm = TRUE) || scale != "none",
col = "heat.colors",  colsep, rowsep, sepcolor = "white", sepwidth = c(0.05, 0.05),
cellnote,   notecex = 1,  notecol = "cyan", na.color = par("bg"),trace = c("none", "column","row", "both"),
tracecol = "cyan", hline = median(breaks), vline = median(breaks), linecol = tracecol,
margins = c(5,5), ColSideColors,RowSideColors,side.height.fraction=0.3,
cexRow = 0.2 + 1/log10(nr),cexCol = 0.2 + 1/log10(nc),
labRow = NULL, labCol = NULL, key = TRUE, keysize = 1.5,
density.info = c("none", "histogram", "density"), denscol = tracecol,
symkey = max(x < 0, na.rm = TRUE) || symbreaks, densadj = 0.25,
main = NULL, xlab = NULL, ylab = NULL, lmat = NULL, lhei = NULL, lwid = NULL,
NumColSideColors = 1, NumRowSideColors = 1, KeyValueName="Value",...)

mssm-msf-2019/BiostatsALL documentation built on May 22, 2019, 12:16 p.m.