rpart2gNEL             package:RbcBook1             R Documentation

_c_o_n_v_e_r_t _a_n _r_p_a_r_t _o_b_j_e_c_t _t_o _a _g_r_a_p_h_N_E_L _i_n_s_t_a_n_c_e

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

_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>

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

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

