[R] Fwd: filter out many data.frames
Christian Schulz
ozric at web.de
Sun May 16 00:12:22 CEST 2004
X <- numeric(length(data.frame))
before the loop maybe work, because
my computer works and works !?
christian
---------- Weitergeleitete Nachricht ----------
Subject: filter out many data.frames
Date: Sonntag, 16. Mai 2004 00:02
From: Christian Schulz <ozric at web.de>
To: r-help at stat.math.ethz.ch
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