[R] t.test per line
Mohamed Lajnef
Mohamed.lajnef at inserm.fr
Wed May 5 18:15:53 CEST 2010
Dear All,
I apologize for this trivial question, I can not find the solution
I try to use t.test function per line in the data.frame, But i
dont'understand the error message
my program is as follows
group1<-gl(2,20)
fun<-function(x){
m<-data.frame(group1,x)
#anova(aov(x ~ group1, m))
t.est(x ~ group1,m)
}
ttest<- apply(data, 1, fun)
Error in t.test.default(x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, :
data are essentially constant
Any help would be appreciated
ML
Best
--
Mohamed Lajnef,IE
INSERM U955 eq 15
Pôle de Psychiatrie
Hôpital CHENEVIER
40, rue Mesly
94010 CRETEIL Cedex FRANCE
Mohamed.lajnef at inserm.fr
tel : 01 49 81 31 31 (poste 18470)
Sec : 01 49 81 32 90
fax : 01 49 81 30 99
More information about the R-help
mailing list