[R] filter out many data.frames

About this list Date view Thread view Subject view Author view Attachment view

From: Christian Schulz (ozric@web.de)
Date: Sun 16 May 2004 - 08:02:56 EST


Message-id: <200405160002.57228.ozric@web.de>

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

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:11 EST