[R] Factor labeling in a tree.plot

Kurt Gerber
Mon, 06 Dec 1999 13:51:48 -0000

Hi all.
I have the problem, that the labels from a factor variable in a tree
object, (more exact, the node - labels) is labeled in a plot with
letters a,b,c... instead of the numerical levels. when I
run
>labels(tree.object)
It gives me the correct labels (the problem concerns 'landuse':
 [1] "root"
"landuse:1,2,3,4,5,6,7,8,9,10"
 [3] "altitude<2883.5"              "landuse:1,4,6"
 [5] "altitude<1909.5"              "altitude>1909.5"
 [7] "landuse:2,3,5,7,8,9,10"       "altitude>2883.5"
 [9] "landuse:1,2,3,5,6,10"         "altitude<3526.5"
[11] "altitude>3526.5"              "landuse:4,7,8,9"
[13] "landuse:11,12"                "altitude<2949.5"
[15] "altitude>2949.5"

But when I run
plot(tree.object)
text(tree.object)
the 'landuse' - nodes are labeled with 'landuse: a, b, c, ... and so
on
How can I access the right labels?
In S-Plus its the same, but with post.tree() I get the true labels.

Kurt Gerber

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._