Description Usage Arguments Value
Generate colors and ids for categorical annotations
1 2 |
df |
data frame to annotate |
col |
name of the character 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. |
sort_label |
a logical value to determine if the data in col should be arranged alphanumerically before ids are assigned. default = T. |
na_val |
The value to use to replace NAs. default = "ZZ_Missing". |
colorset |
The colorset to use for assigning category colors. Options are "rainbow","viridis","inferno","magma", and "terrain" |
color_order |
The order in which colors should be assigned. Options are "sort" and "random". "sort" assigns colors in order; "random" will randomly assign colors. |
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.