You probably do not understand heatmap! Please read You probably don’t understand heatmaps by Mick Watson
In the blog post, Mick used heatmap function in the stats package, I will try to walk you through comparing heatmap, and heatmap.2 from gplots package.
Before I start, I want to quote this:
“The defaults of almost every heat map function in R does the hierarchical clustering first, then scales the rows then displays the image”