Description Usage Arguments Details Value Examples
View source: R/KEGG_function.R
The function will transfer a numeric matrix into a matrix of colors, in which the colors represent the values of numeric matrix
1 | col_by_value(x, col, range = NA, breaks = NA, showColorBar = T)
|
x |
a numeric matrix |
col |
colors used to represent the values. (See also 'Details') |
range |
values out of the range will be modified to in the range. |
breaks |
a numeric vector of three or more cut points giving the number of intervals into which x is to be cut. See also 'Details' |
showColorBar |
Logical. Indicates display the colorbar or not. The default value is TURE. |
A colorbar would also be ploted. The returned colors of the function can be used in function plot_profile. if breaks not equal to NA, col must have the same length with breaks-1.
a matrix equal to x, but the values were instead by colors.
1 2 3 | data(pho_sites_count)
col<-col_by_value(pho_sites_count,col=colorRampPalette(c('white','khaki2'))(4),
breaks=c(0,1,4,10,Inf))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.