mat <- matrix(rnorm(20), ncol = 5, nrow = 4)
col_groups <- c("A","A","B","D","B")
hm <- iheatmap(mat) %>% add_col_groups(col_groups, name = "My Groups")
# Print heatmap if interactive session
if (interactive()) hm
Run the code above in your browser using DataLab