rpart2gNEL             package:RbcBook1             R Documentation

_r_p_a_r_t _t_o _g_r_a_p_h_N_E_L _C_o_n_v_e_r_t_e_r

_D_e_s_c_r_i_p_t_i_o_n:

     Creates an object of class 'graphNEL' from one of class 'rpart'.

_U_s_a_g_e:

     rpart2gNEL(tr, remap=function(x) x, nsep="\n")

_A_r_g_u_m_e_n_t_s:

      tr: instance of 'rpart' class from 'rpart' package.

   remap: function that maps node names in tree to node names in graph.

    nsep: token that separates node name and vote tally in the
          rendering.

_D_e_t_a_i_l_s:

     Not explicitly used in the book, but the basis for a certain graph
     illustrating application of rpart.  The newer coin/party packages
     have more interesting rendering approaches based on graphviz.

     'grabSplitV' is a utility function for acquiring the variable
     names, 'remapAff' will remap affymetrix probe names to gene
     symbols for use in the 'remap' parameter.

_V_a_l_u_e:

     a 'graphNEL-class' instance with nodes constructed to convey
     information on the data tree fit

_A_u_t_h_o_r(_s):

     Vince Carey <stvjc@channing.harvard.edu>

_S_e_e _A_l_s_o:

     'rpart', 'graphNEL-class'

_E_x_a_m_p_l_e_s:

     library(rpart)
     example(rpart)
     ff = rpart2gNEL(fit2)
     ff
     nodes(ff)

