Description Usage Arguments Details Value See Also Examples
View source: R/labeltodendro.R
The function calls other internal functions to count labels, make a table of agglomerations and divisions, and gives a labclust object.
1 2  | 
x | 
 A numeric matrix of integers with iterations in rows and labels in columns. Each row of   | 
labels | 
 A vector of stings concering labels for each column of   | 
The most frequent label will be used to search for agglomerations and divisioins and will be used for plotting and coloring the resulting dendrogram.
merge | 
 Returns a matrix of merges according to   | 
height | 
 Gives heights of each branch of   | 
hcut | 
 Shows where the tree should be cut.  | 
tabletodendro, labeltotable, colorplot, labclust
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  | x<-matrix(c(
c(1,1,1,1,1,1,1,1,1),
c(2,2,2,2,1,2,2,2,2), #exchangeable labels are allowed like this
c(1,1,1,1,1,2,2,2,2),
c(2,2,1,2,2,3,3,3,3),
c(1,1,2,1,1,3,3,3,3),#or like this 
c(1,1,2,1,1,3,3,3,3),
c(1,1,2,3,4,5,5,5,5),
c(1,1,2,3,4,5,5,5,5),
c(1,2,3,4,5,6,7,8,9)), ncol=9, byrow=TRUE) #each iteration in a row
# this creates a matrix of labels
y<-labeltodendro(x)
mydendro<-as.dendrogram(y)
colorplot(y) #uses labclust plot
plot(mydendro) #uses dendrogram plot
plot(mydendro,center=TRUE)#you may like to center the dendrogram leaves
          
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.