View source: R/func__visualisation__drawHeatMap.R
drawHeatMap | R Documentation |
This is a generic function for plotting a heat map given two ID variables and a value variable.
drawHeatMap( data = NULL, x = "x", y = "y", val = "val", diag = 1, replace.na = 0, cluster.row = TRUE, cluster.col = TRUE, cluster.method = "complete", dist.row = "euclidean", dist.col = "euclidean", colour.low = "white", colour.mid = NULL, colour.high = "red", colour.grad = 50, colour.breaks, display.val = FALSE, font.size = 10, filename = "heatmap.png", res = 72, width = 800, height = 800, unit = "px" )
data |
A data frame of at least three columns, such as x, y and z, or a matrix to be plotted directly as a heat map. |
x |
Name (character) of the first variable of IDs. |
y |
Name (character) of the second variable of IDs. |
val |
Name (character) or index (integer) of the variable for values in the heat matrix. |
diag |
The value of diagonal cells in the unclustered heat map. |
replace.na |
The value used to replace NA's. |
cluster.row |
Whether cluster rows hierarchically. |
cluster.col |
Whether cluster columns hierarchically. |
cluster.method |
The method for hierarchical clustering. |
dist.row |
The distance metric for hierarchical clustering of rows. |
dist.col |
The distance metric for hierarchical clustering of columns. |
colour.low |
The colour for the lowest value in the heat matrix. |
colour.mid |
The colour for the middle (that is, the "zero") value. Set to NULL if only a single colour transition are to be included. |
colour.high |
The colour for the highest value. |
colour.grad |
The number of colour grades. |
colour.breaks |
Break points (colour.grad + 1) of values for assigning colours. |
display.val |
A boolean value determining whether to overlay values on the heat map or not. |
font.size |
Font size of labels in the heat map. |
filename |
Path and name for the output PNG image. |
res |
Resolution of the output figure. Default: 72 ppi. |
width |
Width of the output image. |
height |
Height of the output image. |
unit |
The unit of the width and height of the output image. Valid values: "mm" and "px" (default). |
Yu Wan (wanyuac@126.com)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.