title: How can I get the new order of column and row in a heatmap after clusting using the pheatmap
body: <p>I draw a heatmap using the 'pheatmap' package, and clusted with the rows and cloumns. However, for some reason, I need to get the row order and the column order in the heatmap. Is there a convient way to do that? This is a example of pheatmap.</p>
  
  <pre><code>test = matrix(rnorm(200), 20, 10)
  test[1:10, seq(1, 10, 2)] = test[1:10, seq(1, 10, 2)] + 3
  test[11:20, seq(2, 10, 2)] = test[11:20, seq(2, 10, 2)] + 2
  test[15:20, seq(2, 10, 2)] = test[15:20, seq(2, 10, 2)] + 4
  colnames(test) = paste("Test", 1:10, sep = "")
  rownames(test) = paste("Gene", 1:20, sep = "")
  
  pheatmap(test)
  </code></pre>