[R] rpart: Writing values of the leaves to a dateset

hhafner at statistik-hessen.de hhafner at statistik-hessen.de
Mon Apr 12 11:50:43 CEST 2010


I'm fitting a regression tree with rpart and I want to write the values 
for every leaf in a dataset. As an example take the variable turnover. 
Let's suppose my tree for turnover has 30 leaves and I want to have 30 
datasets with dataset 1 containing the turnover values of the units in 
leaf 1, dataset 2 containing turnover values for the observations in leaf 
2 and so on. How can I do this? 

Best regards,
Hans-Peter Hafner



More information about the R-help mailing list