mat <- matrix(rnorm(20), ncol = 5, nrow = 4)
hm1 <- iheatmap(mat) %>% add_row_summary()
hm2 <- iheatmap(mat) %>% add_row_summary(groups = c("A","A","B","B","B"))
# Print heatmap if interactive session
if (interactive()) hm1
if (interactive()) hm2
Run the code above in your browser using DataLab