cluster.index with 'mat' argument for stacking rows of a matrix according to cluster-variable