Extra right paren got copied into the first message by mistake. The
original did not have the extra and the code below does not work.
Also, if you try to use xpred.rpart with "fit2" from the rpart help
page,
it gives the same error as below (i.e.
>xfit <-xpred.rpart(fit2) )
> Error in as.double.default(fit$parms) : (list) object cannot be coerced
to vector type 14
>iris.test.rpart<-rpart(iris$Species~., data=iris[,1:4],
parms=list(prior=c(0.5,0.25, 0.25)))
> xpred.rpart(iris.test.rpart)
> Error in as.double.default(fit$parms) : (list) object cannot be coerced
to vector type 14
At 01:59 PM 8/12/01, Marc R. Feldesman wrote:
>I just updated rpart to the latest version (3.1.0). There are a number of
>changes between this and previous versions, and some of the code I've
been
>using with earlier versions (e.g. 3.0.2) no longer work.
>
>Here is a simple illustration of a problem I'm having with xpred.rpart.
>
>iris.test.rpart<-rpart(iris$Species~., data=iris[,1:4],
>parms=list(prior=c(0.5,0.25, 0.25)))
>+ )
> > xpred.rpart(iris.test.rpart)
>Error in as.double.default(fit$parms) : (list) object cannot be coerced to
>vector type 14
> >
>The problem seems to be with the parms parameter in the call to rpart. If
>I leave parms out of the fit statement, xpred.rpart works fine.
>
>I can't deduce from the help files or the readme what has changed that
>causes this error (I also can't exactly figure out what the error is).
The
>example use of xpred.rpart works fine, but doesn't have a parms
argument in
>the rpart function call.
>
>Any help appreciated.
>
>
>Dr. Marc R. Feldesman
>email: feldesmanm at pdx.edu
>email: feldesman at attglobal.net
>fax: 503-725-3905
>
>"Don't know where I'm going.
>Don't like where I've been.
>There may be no exit.
>But hell, I'm going in." Jimmy Buffett
>
>Powered by Superchoerus - the 700 MHz Coppermine Box
>
>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
>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
>_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
Dr. Marc R. Feldesman
email: feldesmanm at pdx.edu
email: feldesman at attglobal.net
fax: 503-725-3905
"Don't know where I'm going.
Don't like where I've been.
There may be no exit.
But hell, I'm going in." Jimmy Buffett
Powered by Superchoerus - the 700 MHz Coppermine Box
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._