Learn R Programming

wrGraph (version 1.1.1)

imageW: Display numeric content of matrix as image

Description

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.

Usage

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
)

Arguments

dat

(list) main input

col

(character or integer) colors, default is heat.colors in 15 shades

rowNa

(character) optional custom rownames

colNa

(character) optional custom colnames

tit

(character) custom figure title

cexXlab

(numeric) cex-like expansion factor for x-axis labels (see also par)

cexAxs

(numeric) cex-like expansion factor for x- and y-axis text/labels (see also par)

cexYlab

(numeric) cex-like expansion factor for y-axis labels (see also par)

cexTit

(numeric) cex-like expansion factor for title (see also par)

NAcol

(character or integer) custom color fro NA-values, default is grey

las

(numeric) style of axis labels (see also par)

Value

graphical output only

See Also

image, heatmaps including hierarchical clustering heatmap or heatmap.2 from gplots

Examples

Run this code
# NOT RUN {
imageW(as.matrix(iris[1:40,1:4]))
# }

Run the code above in your browser using DataLab