[R] rpart 3.1.0 bug?

Marc R. Feldesman feldesmanm at pdx.edu
Mon Aug 13 03:48:33 CEST 2001


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.


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