consensus             package:agricolae             R Documentation

_c_o_n_s_e_n_s_u_s _o_f _c_l_u_s_t_e_r_s

_D_e_s_c_r_i_p_t_i_o_n:

     The criterion of the consensus is to produce many trees by means
     of boostrap and to such calculate the relative frequency with
     members of the clusters.

_U_s_a_g_e:

     consensus(data,distance=c("binary","euclidean","maximum","manhattan",
     "canberra", "minkowski"),method=c("complete","ward","single","average",
     "mcquitty","median", "centroid"),nboot=500,duplicate=TRUE,cex.text=1, 
     col.text="red", ...)

_A_r_g_u_m_e_n_t_s:

    data: data frame 

distance: method distance, see dist() 

  method: method cluster, see hclust() 

   nboot: The number of bootstrap samples desired. 

duplicate: control is TRUE other case is FALSE 

cex.text: size text on percentage consensus 

col.text: color text on percentage consensus 

     ...: parameters of the plot dendrogram 

_D_e_t_a_i_l_s:

     distance: "euclidean", "maximum", "manhattan", "canberra",
     "binary", "minkowski". Method: "ward", "single", "complete",
     "average", "mcquitty", "median", "centroid". see functions:
     dist(), hclust().

_V_a_l_u_e:

   data : numerical, the rownames is necesary'

   nboot: integer

duplicate: logical TRUE or FALSE

cex.text: size text on consensus

col.text: color text on consensus

_A_u_t_h_o_r(_s):

     F. de Mendiburu

_R_e_f_e_r_e_n_c_e_s:

     An Introduction to the Boostrap. Bradley Efron and Robert J.
     Tibshirani. 1993. Chapman and Hall/CRC

_S_e_e _A_l_s_o:

     'hclust', 'hgroups', 'hcut'

_E_x_a_m_p_l_e_s:

     library(agricolae)
     data(pamCIP)
     # only code
     rownames(pamCIP)<-substr(rownames(pamCIP),1,6)
     par(cex=0.8)
     output<-consensus( pamCIP,distance="binary", method="complete",nboot=500)
     # Order consensus
     Groups<-output$table.dend[,c(6,5)]
     Groups<-Groups[order(Groups[,2],decreasing=TRUE),]
     print(Groups)
     # Identification of the codes with the numbers.
     cbind(output$dendrogram$labels)
     # To reproduce dendrogram
     dend<-output$dendrogram
     data<-output$table.dend
     plot(dend)
     text(data[,3],data[,4],data[,5])

     # Other examples
     # classical dendrogram
     dend<-as.dendrogram(output$dendrogram)
     plot(dend,type="r",edgePar = list(lty=1:2, col=2:1))
     text(data[,3],data[,4],data[,5],col="blue",cex=1)
     #
     plot(dend,type="t",edgePar = list(lty=1:2, col=2:1))
     text(data[,3],data[,4],data[,5],col="blue",cex=1)
     # Without the control of duplicates
     output<-consensus( pamCIP,duplicate=FALSE,nboot=100)

