imageW: Display numeric content of matrix as image

Description Usage Arguments Details Value See Also Examples

View source: R/imageW.R

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 also be referred to as heatmap (note that the term 'hatmap' is also frequently associated with graphical display of hierarchcal clustering results). The function image provides the basic support to do so (ie heatmap without rearranging rows and columns by clustering). 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
imageW(
  dat,
  col = NULL,
  rowNa = NULL,
  colNa = NULL,
  tit = NULL,
  xLab = NA,
  yLab = NA,
  cexXlab = 0.7,
  cexAxs = NULL,
  cexYlab = 0.9,
  cexTit = 1.6,
  NAcol = grDevices::grey(0.8),
  las = 2
)

Arguments

dat

(matrix or dtaa.frame) main input

col

(character or integer) colors, default is 60 shades 'RdYlBu' RColorBrewer, if 'heat.colors' use heat.colors in min 15 shades

rowNa

(character) optional custom rownames

colNa

(character) optional custom colnames

tit

(character) custom figure title

xLab

(character) optional custom names for x-axis

yLab

(character) optional custom names for y-axis

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)

Details

If the main input dat is numeric vector (an not matrix or data.frame) the values will be displayed as multiple columns and single row.

Value

graphical output only

See Also

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

Examples

1
imageW(as.matrix(iris[1:40,1:4]))

wrGraph documentation built on April 12, 2021, 1:07 a.m.