[R] "rpart" or "tree" function issue
Achim Zeileis
Achim.Zeileis at uibk.ac.at
Fri Sep 9 09:39:00 CEST 2011
On Thu, 8 Sep 2011, Carlos Ortega wrote:
> Hi,
>
> Use packages "rpart.plot" or "maptree" to enhance the tree drawing.
> Or another alternative, use "party" package that offers much more graphing
> possibilities.
There is also the "partykit" package on R-Forge which offers party-style
graphics for rpart objects by saying plot(as.party(rpart_object)). See
http://R-Forge.R-project.org/projects/partykit/. A CRAN release is planned
for later this month.
> Regards,
> Carlos Ortega
> www.qualityexcellence.es
>
>
> On Thu, Sep 8, 2011 at 5:27 PM, Brian Jensvold <brnjnsvld at gmail.com> wrote:
>
>> I am trying to create a classification tree using either tree or rpart
>> functions but when it comes to plotting the results the formatting I get is
>> different than what I see in all the tutorials (like
>> http://www.youtube.com/watch?v=9XNhqO1bu0A or
>> http://www.youtube.com/watch?v=m3mLNpeke0I&feature=related or
>> http://www.statmethods.net/advstats/cart.html "tree for kyphosis"). I am
>> trying to take a large demographic population and create a tree which
>> systematically and accurately divides them into 2 pre-defined
>> classifications using multiple predictor variables. What I would like to
>> see is what I have seen in the tutorials similar to to the ones provided
>> above, where it shows something like "12/2" in each leaf or stem or step of
>> the tree which is meant to be interpreded as "at this step/stage there are
>> 12 people of this category and 2 of the other. Instead I am presently
>> getting something like .342524 which I guess could be the result of
>> divideing the two groups inorder to find some porportion but im not sure,
>> and would that be 34% group a or group b? I was also wondering how you
>> know
>> which side is the side of each test where the individual passes or fails?
>> Is yes/pass always on the left?
>>
>> I'm pretty sure this is just a mater of changing some sort of default
>> settings and is in no way a critique of the fine work the designers of R
>> have freely provided us.
>>
>>
>> Thank you
>>
>> [[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.
>>
>
> [[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.
>
More information about the R-help
mailing list