View source: R/params_functions.R View source: R/Package-Code5-Compiled.R
set_n.colors.range | R Documentation |
A necessary parameter for the generation of heatmaps with custom breaks and color scale as is done in myHeatmap and myHeatmapByAnnotation. See note for how this is used.
set_n.colors.range(n)
n |
a single numeric |
this value is used in creating breaks and color scale for heatmaps. A sequence is created along the scale range set by set_scale.range of length n.colors.range set in this function. n.colors.range - 1 colors will then be use to generate the colors in the heatmap. (See notes for the code where this is used). Default is n = 100
Please see params for more information about accessing and setting up these variables.
In myHeatmap and myHeatmapByAnnotation, breaks and colors are set using these and other parameters. breaks <- seq(params$scale.range[1], params$scale.range[2],length.out=params$n.colors.range) my_cols=colorRampPalette(params$scale.colors)(n=params$n.colors.range-1)
~~Alison Moss~~
set_scale.range and set_scale.colors
##initiate parameters
initiate_params()
#view heatmap with default
myHeatmap(RAGP_norm)
##set range to desired and view difference
set_n.colors.range(n = 5)
myHeatmap(RAGP_norm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.