tabletodedndro {labeltodendro} | R Documentation |
The function assumes that labels appear in increasing order and also each row sorted in agglomerative order.
tabletodendro(labmat,freq,labels=NULL)
labmat |
A label matrix, each row sorted in agglomerative orde. Labels should appear in increasing order. |
freq |
A vector of frequencies corresponding to each row of labmat matrix. |
labels |
A vector of frequencies corresponding to each row of labmat matrix. |
If your label matrix does not have labels in increasing order use relabel.matrix
. If the label matrix is not sorted in agglomerative order use selectlabels
.
labclust, relabel.matrix, selectlabels
labmat<-matrix(c( c(1,1,1,1,1,1,1,1,1), c(1,1,1,2,2,1,1,1,1), c(1,1,2,3,3,4,4,4,4)), ncol=9, byrow=TRUE) freq<-c(5,10,15) plot(tabletodendro(labmat,freq,labels=paste("subject",1:9))) #plots the resulting dendrogram plot(tabletodendro(labmat,freq),center=TRUE) # you may like to center the dendrogram