Description Usage Arguments Details Value Author(s) Examples
Given a vector of class labels, return a color vector corresponding to the class values. There is an option to set a different color for NA
. A vector with corresponding color values and a key specifying color value of each class label is returned.
1 | get.colvector(labels,col, NA.flag=FALSE, NA.col="grey")
|
labels |
vector, labels for which color vector is desired. Can be |
col |
vector, a character vector containing colors for each unique class label. Also accepts colors from |
NA.flag |
logical, a logical flag where |
NA.col |
character, color value specifying how |
if the vector labels
has names
, the returned color coded vector will also have names
.
labels.list |
A list, with following elements - |
labels.col
: character, a color coded character vector of labels
key
: a matrix, a 2 x unique class labels
character matrix showing how values in labels
have mapped to col
Arshi Arora
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.