print.rpart              package:rpart              R Documentation

_P_r_i_n_t _a_n _R_p_a_r_t _O_b_j_e_c_t

_D_e_s_c_r_i_p_t_i_o_n:

     This function prints an 'rpart' object.  It is a method for the
     generic  function 'print' of class 'rpart'.

_U_s_a_g_e:

     ## S3 method for class 'rpart':
     print(x, minlength=0, spaces=2, cp, digits= getOption("digits"), ...)

_A_r_g_u_m_e_n_t_s:

       x: fitted model object of class 'rpart'.  This is assumed to be
          the result  of some function that produces an object with the
          same named  components as that returned by the 'rpart'
          function.  

minlength: Controls the abbreviation of labels: see 'labels.rpart'. 

  spaces: the number of spaces to indent nodes of increasing depth.  

  digits: the number of digits of numbers to print.  

      cp: prune all nodes with a complexity less than 'cp' from the
          printout. Ignored if unspecified. 

     ...: arguments to be passed to or from other methods. 

_D_e_t_a_i_l_s:

     This function is a method for the generic function 'print' for
     class  '"rpart"'.  It can be invoked by calling print for an
     object of the  appropriate class, or directly by calling
     'print.rpart' regardless of  the class of the object.

_S_i_d_e _E_f_f_e_c_t_s:

     A semi-graphical layout of the contents of 'x$frame' is printed. 
     Indentation is used to convey the tree topology. Information for
     each node includes the node number, split, size, deviance, and
     fitted value.  For the '"class"' method, the class probabilities
     are also printed.

_S_e_e _A_l_s_o:

     'print',  'rpart.object', 'summary.rpart',  'printcp'

_E_x_a_m_p_l_e_s:

     z.auto <- rpart(Mileage ~ Weight, car.test.frame)
     z.auto
     ## Not run: node), split, n, deviance, yval
           * denotes terminal node

      1) root 60 1354.58300 24.58333  
        2) Weight>=2567.5 45  361.20000 22.46667  
          4) Weight>=3087.5 22   61.31818 20.40909 *
          5) Weight<3087.5 23  117.65220 24.43478  
           10) Weight>=2747.5 15   60.40000 23.80000 *
           11) Weight<2747.5 8   39.87500 25.62500 *
        3) Weight<2567.5 15  186.93330 30.93333 *
     ## End(Not run)

