Hierarchial PCA Clustering with duplicated row names
Try to make your rownames unique first.

So if you have this matrix with duplicate rownames:

m &lt;- replicate(20, rnorm(6)) 
rownames(m) &lt;- c("B", "C", "C", "B", "E1", "E3")
m
         [,1]        [,2]      [,3]      [,4]       [,5]        [,6]       [,7]
B   2.4071997  1.30040528 1.0765500 0.2005440  1.1732384  2.34462132  0.3702172
C  -0.2683534 -0.74607893 0.1611073 0.3145887  0.8208741  1.26575765  0.4205310
C   0.1997264  0.03318396 0.1967151 0.7785350  0.9382146 -0.32475195 -0.9832998
B  -1.2726538  0.22519992 1.1556121 0.7161238  0.5601368  1.02900724 -0.2726709
E1  0.8062722 -1.80899128 0.3936155 0.5724118 -0.8163454  0.04306317 -0.4074828
E3  0.3320706  0.21218846 0.9210126 0.9151837  0.4588621 -1.27784583  1.3292399
         [,8]       [,9]       [,10]      [,11]       [,12]       [,13]
B   0.2305559  0.2964808 -0.01035426 -2.6062776 -0.03143381 -1.48828554
C   0.1622548 -0.6244459 -0.66571655 -0.3529994  1.07540375 -1.58949697
C   0.5984752 -0.6423845 -1.00001700  0.2212160  0.05499773  1.36182121
B  -0.5594747 -0.3570748  1.44098577 -0.4939490 -0.93386684  0.54919399
E1  1.6378047  0.8702920  3.06641490  0.1948452  0.36339348 -1.04694826
E3 -2.2422997  1.0682864  0.14326146 -0.4513848 -0.25819231  0.01364221
        [,14]      [,15]      [,16]      [,17]       [,18]      [,19]
B  -2.0410367  2.4858879  1.0564085 -1.7353230 -0.63024160 -1.2642884
C  -1.2216387  0.5533529 -0.2757584 -0.2119105 -0.68899706  1.0587382
C   0.6401224 -1.5998479  1.4072007 -1.5062900 -0.60161624  0.9781313
B   0.4309208  1.4310142 -0.1702066 -0.7195977  0.37466185  0.2605195
E1  1.2538412  0.3413762 -1.9346107  0.7314531 -0.03105008  0.7341104
E3 -0.3146694 -1.3028086  0.5043235 -0.2568268  0.08336845  1.3097557
        [,20]
B  -1.1245496
C  -0.4552617
C  -1.5498408
B   0.1261818
E1 -0.1180164
E3  2.1035368

# Make them unique with make.names function

rownames(m) &lt;- make.names(rownames(m), unique=T)

m
          [,1]        [,2]      [,3]      [,4]       [,5]        [,6]
B    2.4071997  1.30040528 1.0765500 0.2005440  1.1732384  2.34462132
C   -0.2683534 -0.74607893 0.1611073 0.3145887  0.8208741  1.26575765
C.1  0.1997264  0.03318396 0.1967151 0.7785350  0.9382146 -0.32475195
B.1 -1.2726538  0.22519992 1.1556121 0.7161238  0.5601368  1.02900724
E1   0.8062722 -1.80899128 0.3936155 0.5724118 -0.8163454  0.04306317
E3   0.3320706  0.21218846 0.9210126 0.9151837  0.4588621 -1.27784583
          [,7]       [,8]       [,9]       [,10]      [,11]       [,12]
B    0.3702172  0.2305559  0.2964808 -0.01035426 -2.6062776 -0.03143381
C    0.4205310  0.1622548 -0.6244459 -0.66571655 -0.3529994  1.07540375
C.1 -0.9832998  0.5984752 -0.6423845 -1.00001700  0.2212160  0.05499773
B.1 -0.2726709 -0.5594747 -0.3570748  1.44098577 -0.4939490 -0.93386684
E1  -0.4074828  1.6378047  0.8702920  3.06641490  0.1948452  0.36339348
E3   1.3292399 -2.2422997  1.0682864  0.14326146 -0.4513848 -0.25819231
          [,13]      [,14]      [,15]      [,16]      [,17]       [,18]
B   -1.48828554 -2.0410367  2.4858879  1.0564085 -1.7353230 -0.63024160
C   -1.58949697 -1.2216387  0.5533529 -0.2757584 -0.2119105 -0.68899706
C.1  1.36182121  0.6401224 -1.5998479  1.4072007 -1.5062900 -0.60161624
B.1  0.54919399  0.4309208  1.4310142 -0.1702066 -0.7195977  0.37466185
E1  -1.04694826  1.2538412  0.3413762 -1.9346107  0.7314531 -0.03105008
E3   0.01364221 -0.3146694 -1.3028086  0.5043235 -0.2568268  0.08336845
         [,19]      [,20]
B   -1.2642884 -1.1245496
C    1.0587382 -0.4552617
C.1  0.9781313 -1.5498408
B.1  0.2605195  0.1261818
E1   0.7341104 -0.1180164
E3   1.3097557  2.1035368