I am doing
> library(rpart)
> m <- rpart("y ~ x", D[insample,])
> D[outsample,]
y x
8 0.78391922 0.579025591
9 0.06629211 NA
10 NA 0.001593063
> p <- predict(m, newdata=D[9,])
Error in model.frame(formula, rownames, variables, varnames, extras,
extranames, :
invalid result from na.action
How do I persuade him to give me NA since x is NA?
I looked at ?predict.rpart but didn't find any mention about NAs.
(In this problem, I can easily do it manually, but this is a part of
something bigger where I want him to be able to gracefully handle
prediction requests involving NA).
--
Ajay Shah Consultant
[EMAIL PROTECTED] Department of Economic Affairs
http://www.mayin.org/ajayshah Ministry of Finance, New Delhi
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html