makeColMat: prepare a matrix for plotting by converting it to a color...

Description Usage Arguments Details Value

View source: R/aheatmap.R

Description

this is an application of mapNames4mat() function that maps values to a color space.

Usage

1
makeColMat(mat, colmap, na.name = "NA")

Arguments

mat

the original matrix

colmap

either a named vector or a 2 column matrix specifying old/new mapping. This might be constructed from namedColVec which handles NA

na.name

when there is NA, colmap must have specified how to map na.name to its color. So to index mat where there is missing val, we replace missing val with na.name

Details

this is a safe way to map value to color 1-to-1 since we can specify the old value and the new value deliberately. NA can be handled easily

Value

the color matrix as well as colorfacs for legend returned as a list


nickytong/GenAnalysis documentation built on July 20, 2019, 8:57 a.m.