[R] is then an equivalent of partition.tree for rpart?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Jan 8 08:32:01 CET 2002
On Mon, 7 Jan 2002, David Marimont wrote:
> partition.tree plots in 2d the partition of a classification tree produced by the function
> tree (assuming the data frame from which it was computed has two continuous predictors).
> I get an error when I feed a tree produced by rpart to partition.tree (since trees
> produced by rpart are superclasses of those produced by tree). Is there an equivalent of
They are not a superclass. The help page is I think out of date on this.
There used to be a function as.tree, but that has gone I see.
> partition.tree for objects of class rpart? Actually, what I'd really like is one that
> worked for any number of continuous predictors, but let me choose which two to plot. Thanks.
That's not really possible. You can't plot the partition in a 2D space
unless only two vars are involved, and partition.tree checks that out.
> David Marimont
> NXP Data Analysis, Inc.
> http://www.nxpdata.com
>
> P.S. All terminology is approximate. Corrections welcome.
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list