Dear R experts,
 
I need help to make my little program efficient which now takes 2hrs to complete.
 
Using arules package I developed set of rules consisted of 900 rules. Now I want to check whether a lower rule is a subset of a higher premises rule. And if it is a subset of higher premises rule then drop this rule. I am using following code but it takes too much time.
 
  
nor<-length(rules)
k<-rep(T, nor)
for(i in 1:(nor-1)){
      for(j in (i+1):nor){
         if((is.subset(lhs(rules[i]),lhs(rules[j])) & is.subset(rhs(rules[i]), rhs(rules[j])))==T){
            k[i]<-F
            break
         }
     }
}
 
Could somebody help me.
 
Thanks
 
Daniel
Amsterdam
 

Send instant messages to your online friends http://uk.messenger.yahoo.com 
	[[alternative HTML version deleted]]

