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
Run the code above in your browser using DataLab