[R] Rulefit with R and missing values

carine slttls at hotmail.fr
Wed Mar 23 12:03:38 CET 2011


Hi,

I'm using R to treat a table (with a lot of missing values) with Rulefit.
The matter is when I use the command 
rfmod. Actually, I don't know how to deal with the error message. I don't
know were "true" or "false" is missing.

Someone can help me?
Thanks

The following part is the script I used with the error at the end.


platform = "windows"
rfhome = "C:/Rulefit"
source("C:/Rulefit/rulefit.r")
install.packages("akima", lib=rfhome)
library(akima, lib.loc=rfhome)
save.image("C:/Rulefit/init_rulefit.RData")

setwd("C:/Rulefit")
load("C:/Rulefit/init_rulefit.RData")
library(akima, lib.loc=rfhome)

satisf1<-read.table("rulefit satisf
preop.txt",header=TRUE,dec=".",na.strings="?")

tt<-dim(satisf1)

ref<- array(1, dim=c(tt[1],tt[2]-1))
resp<- array(1, dim=c(tt[1],1))

for ( i in 1 : tt[1]) {
	resp[i,1]=satisf1[i,tt[2]]	
	for (j in 1 : (tt[2]-1)) {
		ref[i,j]=satisf1[i,j]
	}
}

erreur_pred<-array(1, dim=c(tt[1],1))

rfmod  = rulefit (ref,resp,rfmode="class")
Erreur dans if (xmiss <= bgstx) stop(paste("value of xmiss =", xmiss, "is
smaller than largest predictor variable value =",  : 
  valeur manquante là où TRUE / FALSE est requis


--
View this message in context: http://r.789695.n4.nabble.com/Rulefit-with-R-and-missing-values-tp3399190p3399190.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list