[R] filter out many data.frames

Christian Schulz ozric at web.de
Sun May 16 00:02:56 CEST 2004


Hi ,

i would like  filter out all combinations of a  data-mining result?
How i have to declare X because in every loop step it have another lengths ?

  X <- numeric(length(i1,...,i64))  ?

Many thanks
Christian


 tres <- function(data.frame) {
+ data <- expand.grid(class02 = c("A","B","C","D"), class04 = 
c("A","B","C","D"),PREDICT = c("A","B","C","D"))
+     for (i in 1:nrow(data)){
+     X[i]<- dtree[dtree$class02 == paste(data$class02[i]) & dtree$class04 == 
paste(data$class04[i]) & dtree$PREDICT==paste(data$PREDICT[i]),]
+     }
+     return(X[i])
+     }
> 
>  tres(dtree)
Error: Object "X" not found




More information about the R-help mailing list