R pheatmap: Perform clustering and show dendrograms PER ANNOTATION CATEGORY
问题 I know how to group rows (genes) by annotation category using pheatmap, and I know how to perform Person's correlation clustering on the whole set of rows (genes), but what I would like to accomplish would be to perform clustering (and show independent dendrograms) on each category independently. Is that even possible? Or am I forced to create a separate heat map for each category to do the clustering on a category basis? Check my MWE below: set.seed(1) library(pheatmap) mymat <- matrix(rexp