order.dendrogram             package:mva             R Documentation

_G_e_t _t_h_e _o_r_d_e_r_i_n_g _o_f _t_h_e _l_e_a_v_e_s _i_n _a _d_e_n_d_r_o_g_r_a_m

_D_e_s_c_r_i_p_t_i_o_n:

     This function returns the order (index) for the leaves in a
     dendrogram. These indices can then be used to access the
     appropriate components of any additional data.

_U_s_a_g_e:

     order.dendrogram(x)

_A_r_g_u_m_e_n_t_s:

       x: A dendrogram. 

_D_e_t_a_i_l_s:

     The indices for the leaves in left to right order are retrieved.

_V_a_l_u_e:

     A vector with length equal to the number of leaves in the
     dendrogram is returned. Each element is the index into the
     original data (from which the dendrogram was computed)

_A_u_t_h_o_r(_s):

     R. Gentleman

_S_e_e _A_l_s_o:

     'reorder'

_E_x_a_m_p_l_e_s:

       set.seed(123)
       x<-rnorm(10)
       hc <- hclust(dist(x))
       hc$order
       dd <- as.dendrogram(hc)
       order.dendrogram(dd)

