[R] Help on R performance using aov function
    Francoise PFIFFELMANN 
    francoise.pfiffelmann at st.com
       
    Thu Aug  9 11:48:28 CEST 2007
    
    
  
Hi, 
Im trying to replace some SAS statistical functions by R (batch calling).
But Ive seen that calling R in a batch mode (under Unix) takes about 2or 3
times more than SAS software. So its a great problem of performance for me.
Here is an extract of the calculation:
stoutput<-file("res_oneWayAnova.dat","w"); 
cat("Param|F|Prob",file=stoutput,"\n"); 
for (i in 1:n) { 
p<-list_param[[i]] 
aov_<-aov(A[,p]~ A[,"wafer"],data=A); 
anova_<-summary(aov_); 
if (!is.na(anova_[[1]][1,5]) & anova_[[1]][1,5]<=0.0001)
res_aov<-cbind(p,anova_[[1]][1,4],"<0.0001") else
res_aov<-cbind(p,anova_[[1]][1,4],anova_[[1]][1,5]); 
cat(res_aov, file=stoutput, append = TRUE,sep = "|","\n"); 
}; 
close(stoutput); 
A is a data.frame of about (400 lines and 1800 parameters).
Im a new user of R and I dont know if its a problem in my code or if
there are some tips that I can use to optimise my treatment.
Thanks a lot for your help.
Françoise Pfiffelmann
Engineering Data Analysis Group
--------------------------------------------------
Crolles2 Alliance
860 rue Jean Monnet
38920 Crolles, France
Tel: +33 438 92 29 84
Email: francoise.pfiffelmann at st.com
    
    
More information about the R-help
mailing list