[R] tree and rpart

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Jul 26 15:27:31 CEST 2001


There have been various messages about packages tree and rpart whilst
I have been travelling, and I have now prepared updates.

tree
====

Tree is one of the oldest packages on CRAN (Feb 2000 apart from adding
the maintainer field), and I had been hoping that it would fade away
in favour of rpart.

1) sys.parent needed to be replaced by parent.frame in all but the
   most recent R (post 1.3.0).

2) There have been various reports about singlenode trees.  Almost all
   of these are the same in the S original.  I've altered the code so
   that class "singlenode" inherits from class "tree" and added a few
   checks, so singlenode trees should be better supported.

tree_1.0-3.tar.gz is at http://www.stats.ox.ac.uk/pub/R and
en route to CRAN.  The Windows version is on
http://toucan.stats.ox.ac.uk/R/RWin and will propagate to CRAN.


rpart
=====

Since rpart 2.x, rpart could do all that tree could do, faster.  We
are now on rpart 3.x, which added user-specified splits and
NA-handling.  At some point fairly soon rpart is expected to ship as
part of S-PLUS and the interface will be frozen, but that means that
Terry Therneau has made lots of undocumented changes that some of you
have been finding.

The main one is the output from predict.rpart on a classification
tree.  I've tried to make this easier (and to document it) in version
3.0-2.  You should use type = "class" (the predicted class) or "probs"
(the class probabilities) with a classification tree.  I've changed
the default for classification trees back to "probs", so code should
work again.

Also, residuals.rpart had not been updated for the new structures.

rpart_3.0-2.tar.gz is at http://www.stats.ox.ac.uk/pub/R and
en route to CRAN.  The Windows version is on
http://toucan.stats.ox.ac.uk/R/RWin and will propagate to CRAN.


The changes are ongoing, and rpart_3.1-0.tar.gz will be available shortly.
This adds mis-classification costs, revises (again) how survival trees
work, ....  Unless you need to use rpart now, I suggest not updating until
rpart_3.1-0.tar.gz is released.  [It's running, but I want to look harder
for undocumented changes.]


-- 
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