annotate_num | R Documentation |
Generate colors and ids for numeric annotations. From library(scrattch.io)
annotate_num(df, col = NULL, base = NULL, scale = "log10", na_val = 0, colorset = c("darkblue", "white", "red"))
df |
data frame to annotate |
col |
name of the numeric column to annotate |
base |
base name for the annotation, which wil be used in the desc table. If not provided, will use col as base. |
scale |
The scale to use for assigning colors. Options are "linear","log10","log2, and "zscore" |
na_val |
The value to use to replace NAs. default = 0. |
colorset |
A vector of colors to use for the color gradient. default = c("darkblue","white","red") |
A modified data frame: the annotated column will be renamed base_label, and base_id and base_color columns will be appended
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.