[R] Regression tree: labels in the terminal nodes

Juergen Kuehn Juergen.Kuehn at zalf.de
Thu Aug 16 13:50:44 CEST 2007


Dear everybody,


I'm a new user of R 2.4.1 and I'm searching for information on improving 
the output of regression tree graphs.

In the terminal nodes I am up to now able to indicate the number of 
values (n) and the mean of all values in this terminal node by the command

 > text(tree, use.n=T, xpd=T)

Yet I would like to indicate automatically in the output graph of the 
tree some quality measure, e.g. impurity (or standard deviation .....) 
and a character to identify which cases are in one terminal node, e.g. 
given a ID number or name.

Until now I did not discover in my R help scripts or in the R programm 
help how to do it. So I calculate impurity by hand, and I'm identifying 
the cases in each node "by hand", and I am adding these values with a 
graphical software to the graph (as e.g. given "*.jpg" file). Therefore 
anybody can see that I added these values by hand. I'm quite sure that 
there is a more easy and faster way which looks (and is!) more professional.

Could anybody help me? That would be great!


Thank you very much for your support!


Dr. Jürgen Kühn
Leibniz-Centre for Agricultural Landscape Research (ZALF)
Institute of Soil Landscape Research_ 
<http://www.zalf.de/home_zalf/institute/blf/blf_e/index.html>_
Eberswalder Str. 84
D-15374 Müncheberg
Tel.: ++49/(0)33432/82-123
Fax: ++49/(0)33432/82-280
E-mail: Juergen.Kuehn at zalf.de <mailto:Juergen.Kuehn at zalf.de>
Internet: http://www.zalf.de/home_zalf/institute/blf/blf/



More information about the R-help mailing list