[R] Rulefit with R and missing values

From: carine <slttls_at_hotmail.fr>
Date: Wed, 23 Mar 2011 04:03:38 -0700 (PDT)


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.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 23 Mar 2011 - 11:24:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 23 Mar 2011 - 12:30:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive