dplot                 package:hopach                 R Documentation

_f_u_n_c_t_i_o_n _t_o _m_a_k_e _a _p_s_e_u_d_o-_c_o_l_o_r _i_m_a_g_e _o_f _a _d_i_s_t_a_n_c_e _m_a_t_r_i_x _w_i_t_h _t_h_e _r_o_w _a_n_d _c_o_l_u_m_n _o_r_d_e_r_i_n_g _b_a_s_e_d _o_n _H_O_P_A_C_H _c_l_u_s_t_e_r_i_n_g _r_e_s_u_l_t_s.

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

     The 'hopach' clustering function orders the elements being
     clustered. This ordering can be used to rearrange the rows and
     columns in the corresponding distance matrix. A pseudo-color image
     of the ordered distance matrix will reveal the underlying patterns
     in the clustered data.

     The functions 'heat.colors', 'terrain.colors' and 'topo.colors'
     create heat-spectrum (red to white) and topographical color
     schemes suitable for displaying ordered data, with 'n' giving the
     number of colors desired.

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

     dplot(dist, hopachobj, ord = "final", col = heat.colors(12), main = NULL, 
     xlab = NULL, ylab = NULL, labels = NULL, showclusters = TRUE, ...)

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

    dist: matrix of all pair wise distances between a set of 'p'
          elements,  as produced, for example, by the 'distancematrix'
          function.  The value in row 'j' and column 'i' is the
          distance between element 'i' and element 'j'. The matrix must
          be symmetric. The distance metric should be the same as that
          used in the 'hopach' function.

hopachobj: output of the 'hopach' function.

     ord: character string indicating which of the two orderings
          produced by 'hopach' should be used for the plot. If
          ord="final", the ordering of elements in the final level of
          the hierarchical tree is used. If ord="cluster", the ordering
          from the level of the tree corresponding to the main clusters
          is used. In both cases, the elements from each cluster will
          be contiguous. If ord="final", then the medoid element will
          appear in the middle of each cluster. Else, the ordering
          depends on the value of 'ord' passed to the 'hopach'
          function. If ord="none", then the elements are plotted in the
          same order as in dist.

     col: a list of colors such as that generated by 'rainbow',
          'heat.colors', 'topo.colors', 'terrain.colors' or similar
          functions.

    main: character string to be used as the main title

    xlab: character string to be used as the horizontal axis label. If
          NULL, the label will be "" (no label).

    ylab: character string to be used as the vertical axis label. If
          NULL, the label will be "" (no label).

  labels: a vector of labels for the elements being clustered to be
          used on the axes. If labels=NULL, no axes are plotted - this
          is useful when there are a large number of elements being
          plotted.

showclusters: indicator of whether or not to show the cluster
          boundaries on the plot. If show.clusters=TRUE, dotted lines
          are drawn at the edges of the clusters.

     ...: additional arguments to the 'image' plotting function

_N_o_t_e:

     Thank you to Sandrine Dudoit <sandrine@stat.berkeley.edu> for her
     input.

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

     Katherine S. Pollard <kpollard@gladstone.ucsf.edu> and Mark J. van
     der Laan <laan@stat.berkeley.edu>

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

     van der Laan, M.J. and Pollard, K.S. A new algorithm for hybrid
     hierarchical clustering with visualization and the bootstrap.
     Journal of Statistical Planning and Inference, 2003, 117, pp.
     275-303.

     <URL:
     http://www.stat.berkeley.edu/~laan/Research/Research_subpages/Papers/hopach.pdf>

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

     'distancematrix', 'hopach', 'image'

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

     mydata<-matrix(rnorm(50),nrow=10)
     mydist<-distancematrix(mydata,d="euclid")
     clustresult<-hopach(mydata,dmat=mydist)
     dplot(mydist,clustresult,showclusters=FALSE)
     dplot(mydist,clustresult,col=topo.colors(15))

