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)

