Description Usage Arguments Details Value
this is an application of mapNames4mat() function that maps values to a color space.
1 | makeColMat(mat, colmap, na.name = "NA")
|
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 |
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
the color matrix as well as colorfacs for legend returned as a list
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.