Re: [R] how to extract the variables used in decision tree

2010-05-11 Thread David Winsemius
On May 11, 2010, at 6:49 PM, Changbin Du wrote: HI, Dear R community, How to extract the variables actually used in tree construction? I want to extract these variables and combine other variable as my features in next step model building. help(package=rpart, rpart.object) printcp(

[R] how to extract the variables used in decision tree

2010-05-11 Thread Changbin Du
HI, Dear R community, How to extract the variables actually used in tree construction? I want to extract these variables and combine other variable as my features in next step model building. > printcp(fit.dimer) Classification tree: rpart(formula = outcome ~ ., data = p_df, method = "class") V