To get a quick overview of the distribution of data and, in particular, of local phenomena it is useful to express numeric values as colored boxes.
Such an output can be referred to as heatmap.
The function image
provides the basic support to do so.
To do this more conveniently, the function imageW
offers additional options for displaying row- and column-names or displaying NA-values as custom-color.
imageW(
dat,
col = NULL,
rowNa = NULL,
colNa = NULL,
tit = NULL,
cexXlab = 0.7,
cexAxs = NULL,
cexYlab = 1,
cexTit = 1.6,
NAcol = grDevices::grey(0.8),
las = 2
)
(list) main input
(character or integer) colors, default is heat.colors in 15 shades
(character) optional custom rownames
(character) optional custom colnames
(character) custom figure title
(numeric) cex-like expansion factor for x-axis labels (see also par
)
(numeric) cex-like expansion factor for x- and y-axis text/labels (see also par
)
(numeric) cex-like expansion factor for y-axis labels (see also par
)
(numeric) cex-like expansion factor for title (see also par
)
(character or integer) custom color fro NA-values, default is grey
(numeric) style of axis labels (see also par
)
graphical output only
image
, heatmaps including hierarchical clustering heatmap
or heatmap.2
from gplots
# NOT RUN {
imageW(as.matrix(iris[1:40,1:4]))
# }
Run the code above in your browser using DataLab