hc2Newick                package:ctc                R Documentation

_C_o_n_v_e_r_t _h_c_l_u_s_t _o_b_j_e_c_t_s _t_o _N_e_w_i_c_k _f_o_r_m_a_t _f_i_l_e_s

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

     Convert hclust objects to Newick format files.

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

       hc2Newick(hc, flat=TRUE)

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

      hc: a 'hclust' object (as returned by the function 'hclust' in
          the package 'stats')

    flat: a boolean (see section value).

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

     If 'flat=TRUE' the result is a string (that you can write in a
     file).

     If 'flat=FALSE' the result is a list (of lists). Each list is
     consituted of the elements 'left', 'right' and 'dist'.

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

     Laurent (laurent@cbs.dtu.dk)

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

     Antoine Lucas and Sylvain Jasson, _Using amap and ctc Packages for
     Huge Clustering_, R News, 2006, vol 6, issue 5 pages 58-60.

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

     data(USArrests)
     h = hclust(dist(USArrests))
     write(hc2Newick(h),file='hclust.newick')

