[R] sapply?

casot at libero.it casot at libero.it
Thu Aug 2 11:04:16 CEST 2007


I tried to perform a two way anova on my data, but I got this error

vitignova<-sapply(vitigni.df[,1:length(vitigni)], FUN=function(x) summary(aov(x~vitigni.df$cultivar*vitigni.df$year))[[1]][1,"Pr(>F)"])
Errore in `contrasts<-`(`*tmp*`, value = "contr.treatment") : 
        i contrasti si possono applicare solo a variabili factor con 2 o più livelli

how can I solve this problem? I thank u for your patience and attention.



---------- Initial Header -----------

>From      : "casot at libero.it" casot at libero.it
To          : "casot" casot at libero.it
Cc          : "r-help" r-help at stat.math.ethz.ch
Date      : Thu,  2 Aug 2007 08:53:32 +0200
Subject : [R] sapply?







> I have to compare four different grape varieties proteome in two different years. I don't know what test would be more suitable for my data. I think that an anova two way can be usefull also if someone suggested me to perform a manova. In addiction, I can perform each test on a single protein a time, but I can't loose my whole life carrying out anova (I have more than 1000 protein to analyze)!!! I would like to perform the test on every column of the dataframe in a single run. How can I do that? I attach an example of some protein of my dataset
> > 
> > 
> > ------------------------------------------------------
> > Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind
> > http://i-mode.wind.it/
> > 
> > 
> 
> 
> ------------------------------------------------------
> Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind
> http://i-mode.wind.it/
> 
>



More information about the R-help mailing list