I have the following code:
library(gplots) library(RColorBrewer); setwd("~/Desktop") mydata <- mtcars hclustfunc <- function(x) hclust(x, method="complete") distfunc <- function(x) dist(x,method="euclidean") d <- distfunc(mydata) fit <- hclustfunc(d) clusters <- cutree(fit, h=100) nofclust.height <- length(unique(as.vector(clusters)));
Which produce the following figure: 
What I want to do is to cluster both in the row and in the column and show the clusters (RowSideColors and ColSideColors) next to the dendrogram. How can i achieve this?
At the moment, I am able to show RowSideColors , but not ColSideColors .
source share