This function will create a ComplexHeatmap::columnAnnotation object with rows for each variable passed as argument. Character columns will be coerced into factors. For factors, the ColorBrewer palette Set3 will be used. For non-negative numeric, the PuBu palette will be used, and for columns with negative values, the reversed RdBu will be used.

create_annotations(df, selected_variables)

Arguments

df

a data frame. It can be an original unscaled data, or a scaled one

selected_variables

list of columns in the data frame to create annotations for