varUsed             package:randomForest             R Documentation

_V_a_r_i_a_b_l_e_s _u_s_e_d _i_n _a _r_a_n_d_o_m _f_o_r_e_s_t

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

     Find out which predictor variables are actually used in the random
     forest.

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

     varUsed(x, by.tree=FALSE, count=TRUE)

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

       x: An object of class 'randomForest'.

 by.tree: Should the list of variables used be broken down by trees in
          the forest?

   count: Should the frequencies that variables appear in trees be
          returned?

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

     If 'count=TRUE' and {by.tree=FALSE}, a integer vector containing
     frequencies that variables are used in the forest.  If
     'by.tree=TRUE', a matrix is returned, breaking down the counts by
     tree (each column corresponding to one tree and each row to a
     variable).

     If 'count=FALSE' and 'by.tree=TRUE', a list of integer indices is
     returned giving the variables used in the trees, else if
     'by.tree=FALSE', a vector of integer indices giving the  variables
     used in the entire forest.

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

     Andy Liaw

_S_e_e _A_l_s_o:

     'randomForest'

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

     data(iris)
     set.seed(17)
     varUsed(randomForest(Species~., iris, ntree=100))

