[R] tree() producing NA's

From: Amnon Melzer <amnon.melzer_at_eighty20.co.za>
Date: Mon, 11 Feb 2008 09:31:19 +0200


Hi  

Hoping someone can help me (a newbie).  

I am trying to construct a tree using tree() in package tree. One of the fields is a factor field (owner), with many levels. In the resulting tree, I see many NA's (see below), yet in the actual data there are none.  

> rr200.tr <- tree(backprof ~ ., rr200)

> rr200.tr

  1. root 200 1826.00 -0.2332

...

[snip]

...

    5) owner: Cliveden Stud,NA,NA,NA,NA,NA,NA,NA,NA 10 14.25 1.5870 *

  3) owner: B E T Partnership,Flaming Sambuca Syndicate,NA,NA,NA,NA,NA,NA,NA,NA 11 384.40 10.5900

    6) decodds < 12 5 74.80 6.3000 *

    7) decodds > 12 6 140.80 14.1700 *  

Can anyone tell me why this happens and what I can do about it?  

Regards  

Amnon  

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 11 Feb 2008 - 09:31:22 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 11 Feb 2008 - 10:30:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive