Description Usage Arguments Author(s) Examples
A flexible heatmap function with dendrograms on both sides.
1 2 3 4 5 6 7 8 9 10 | zheatmap(data, colSideBar = NULL, rowSideBar = NULL, Rowv = TRUE,
Colv = TRUE, colors = viridis(n = 256, alpha = 1, begin = 0, end = 1,
option = "viridis"), line.color = "white", line.size = 0,
seriate = "OLO", scale = c("column", "row", "none"),
scale.fun = c("scale", "absolute_scale"), xtext = FALSE,
ytext = TRUE, text.size = 12, xtext.angle = 0, ytext.angle = 0,
xtext.hjust = 1, xtext.vjust = 0, ytext.hjust = 1,
ytext.vjust = 0, legend.text.size = 9, show.legend.scale = FALSE,
show.value = FALSE, text.data = NULL, text.value.size = text.size,
text.value.cutoff = c(-Inf, Inf), heights, widths, print = TRUE)
|
data |
a data.frame object |
colSideBar |
a character or factor vector to annotate on the column side between the heatmap ans column-wize dendrogram |
Rowv |
a logical value whether to show the row-wise dendrogram |
Colv |
a logical value whether to show the column-wise dendrogram |
colors |
a character vector off colors to use. The default uses
|
seriate |
character indicates the method to use to calculate the dist.
Usful methods include "OLO", "GW", and "HC". See |
scale |
A character value indicates whether the data should be scaled column wise or row wise, or not scaled. |
scale.fun |
the scale function to use. When using "scale" the
|
xtext |
logic whether to show x axis labels |
ytext |
logic whether to show y axis labels |
text.size |
numeric |
xtext.angle |
numeric |
ytext.angle |
numeric |
xtext.hjust |
numeric |
xtext.vjust |
numeric |
ytext.hjust |
numeric |
ytext.vjust |
numeric |
show.legend.scale |
logic value whether to show scales on color key. Default is TRUE. |
show.value |
bolean, whether show values on heatmap |
heights |
numeric vector with length of 2 |
print |
logic, whether to print the heatmap out or not. Default is TRUE and if FALSE, a grob object will be returned |
value.cutoff |
numeric, length bust be 2. All values beyond this range |
value.size |
numeric, the size of values to display will displayed as "< ..." or "> ..." |
width |
numeric vector with length of 2 |
Chenghao Zhu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # using the mtcars data
zheatmap(mtcars)
# show x axis texts and rotate them 90 degree
zheatmap(t(mtcars), scale = "row", xtext.angle = 90)
# change the color
library(RColorBrewer)
my_colors = colorRampPalette(rev(brewer.pal(11, "RdBu")))(256)
zheatmap(mtcars, colors = my_colors)
# use hierachical clustring method
zheatmap(mtcars, seriate = "HC")
# hide the column wise dendrogram
zheatmap(mtcars, Colv = F)
# use color side bar to annotate
zheatmap(mtcars[,-2], rowSideBar = factor(mtcars$cyl))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.