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