Below are a few steps to perform one-way ANOVA and multiple comparisons in R.
When you make a hierarchical clustering with the option
Colv on, rows in the matrix will be re-ordered. Of course you can set the
labRow on to show row labels, but they will be difficult to recognize if there are many rows. To get the re-ordered matrix, do the following:
Actually there is a very simple solution without need to search for specific functions. But it did not come to my mind in the past several days, when I tried to use
apply and its variants and to set up
function or a loop inside the rows and columns. The idea is to set the maxmium value in each row to 1 and the rest values scaled.