[Ruler-commits] r58 - pkg/ruleR/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Oct 9 23:11:22 CEST 2012


Author: merysionek
Date: 2012-10-09 23:11:22 +0200 (Tue, 09 Oct 2012)
New Revision: 58

Modified:
   pkg/ruleR/R/ruleR_upgraded_final.R
Log:
forgot that sequenceR as a first element of list must return a list (this is needed for createTest function) - so I fixed this

Modified: pkg/ruleR/R/ruleR_upgraded_final.R
===================================================================
--- pkg/ruleR/R/ruleR_upgraded_final.R	2012-10-09 20:38:10 UTC (rev 57)
+++ pkg/ruleR/R/ruleR_upgraded_final.R	2012-10-09 21:11:22 UTC (rev 58)
@@ -302,8 +302,12 @@
 # 'start' - range from which starting values are generated
 
 
+sequenceR<-function(start,rule,seqlen, random=TRUE)
+  {
+  return(a)}
 
 
+
 setMethod("sequenceR",signature(start="vector",rule="SingleRule",seqlen="numeric", random ="logical"),
           function(start,rule,seqlen, random = TRUE){
                       
@@ -369,18 +373,15 @@
                     
             
             odd_list<-sequenceR(start=start,rule=rule at odd_rule,seqlen=seqlen%/%2,random=random)[[1]]
-            print(odd_list)
+            
             even_list<-sequenceR(start=start,rule=rule at even_rule,seqlen=seqlen%/%2,random=random)[[1]]
-            print(even_list)
-
-            
+                        
             k<-unlist(mapply(c,odd_list, even_list, SIMPLIFY=FALSE))
-            print(k)
             if(seqlen%%2==1)k<-c(k,calculate(rule at odd_rule,k[[length(k)-1]]))#if sequence length is an odd number
 
             
             
-            return(list(k,rule))
+            return(list(as.list(k),rule))
           })
 
 



More information about the Ruler-commits mailing list