[R] list & calculaton in many df subsets

Christian Schulz ozric at web.de
Tue May 18 10:18:13 CEST 2004


Hi,

have anybody a hint /starting point how i can 
enlarge my code that's posiible for me make any  calculaton's
with variables in the  64 subset's.

Example: 
I want calculate difference of two variables inside every
of the 64 subset data.frames  and getting this value in tList!

Many thanks,
Christian


tasign <- paste("tList[[n]]  <-   try(dtree[dtree$class02 == 
paste(data$class02[n]) & dtree$class04 == paste(data$class04[n]) & 
dtree$PREDICT==paste(data$PREDICT[n]),])")
tasign <-  parse(text=tasign)[[1]]
          
for(n in 1:nrow(data)) {
  TAsign <- do.call("substitute",list(tasign,list(n=n,X=as.name(n))))
  eval(TAsign)
}




More information about the R-help mailing list