[R] rpart 3.1.0 bug?

Prof Brian D Ripley ripley at stats.ox.ac.uk
Mon Aug 13 07:57:33 CEST 2001


On Sun, 12 Aug 2001, Marc R. Feldesman wrote:

> There seems to be a simple, if inelegant, fix for the xpred.rpart problem.
>
> In the file xpred.rpart, I found that changing the following line fixed the
> bug:
>
>
> costs <- fit$call$costs
>      if (is.null(costs))
>          costs <- rep(1, nvar)
>          parms<-as.double(fit$parms)
>
> Change last line to:
>      parms <- as.vector(as.double(unlist(fit$parms)))
>
> This works with all my test examples.  I have no idea how this ramifies to
> other areas of the code that I don't use.  YMMV.

None, I expect, and as you pointed out, the test suite does not use it
either.  It's a change in the original S code from which I am porting.

I'll take a look when I have time.

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