vec2distm               package:gclus               R Documentation

_V_a_r_i_o_u_s _u_t_i_l_i_t_y _f_u_n_c_t_i_o_n_s

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

     'vec2distm' converts a vector to a distance matrix.

     'vec2dist' converts a vector to a 'dist' structure.

     'lower2upper.tri.inds' is the same as 'lower.to.upper.tri.inds'
     from package cluster. It computes an index vector for extracting
     or reordering a lower      triangular matrix that is stored as a
     contiguous vectors. 

     'diag.off'  returns a vector of off-diagonal elements of a matrix.
     'off' specifies the distance above the main (0) diagonal.

     'clus2memship' converts  a list whose ith element contains the
     indices of objects in the ith cluster into a vector whose ith 
     element gives the cluster number of the ith object.

     'memship2clus' converts  a vector whose ith  element gives the
     cluster number of the ith object into a list  whose ith element
     contains the indices of objects in the ith cluster.

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

     vec2distm(vec)
     vec2dist(vec)
     lower2upper.tri.inds(n)
     diag.off(m,off=1)
     clus2memship(clusters)
     memship2clus(memship)

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

     vec: is a vector. 

       n: is an integer > 1. 

       m: 

clusters: is a list whose ith element contains the indices of the 
          objects belonging to the ith cluster.

     off: is an integer specifying the distance above the main (0)
          diagonal.

 memship: is a vector whose ith element gives the cluster number of 
          the ith object.

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

     Catherine B. Hurley

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

     'dist', 'diag'.

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

     vec <- 1:15
     vec2distm(vec)
     vec2dist(vec)
     diag.off(vec2distm(vec))
     lower2upper.tri.inds(5)
     clus2memship(list(c(1,3,5),c(2,6),4))
     memship2clus(c(1,3,4,2,1,4,2,3,2,3))

