I'm trying to get predict.lm() to return an NA for each NA row in it's input vector, so the output is the same length as the input.
I thought that using na.action=na.exclude with lm() would do that. But apparently not ?? df <- data.frame(x=c(NA,1,2,3,NA),y=c(0,2,3,4,0)) tl <- lm(y~x,df,na.action=na.exclude) predict.lm(tl,data.frame(x=c(2.5,NA,3,4,5))) 1 3 4 5 3.5 4.0 5.0 6.0 Any suggestions? Bruce ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
