[R] Odp: Error while doing T-test

Petr PIKAL petr.pikal at precheza.cz
Wed Feb 15 11:36:19 CET 2012


Hi

> 
> hi,
> 
> i am using R for first time. i am trying to do T-test for a sample set 
with
> three variables. i attached my data set as CSV file.
> but when i do "t.test(data$Day.1,data$Day.2,var.equal=T)" i get this
> following error. Can anyone please help e identify the problem.
> 
> Error in if (stderr < 10 * .Machine$double.eps * abs(mx)) stop("data are
> essentially constant") :
>   missing value where TRUE/FALSE needed
> In addition: Warning message:
> In mean.default(x) : argument is not numeric or logical: returning NA

I think than in this case the error message is self explaining.

> In mean.default(x) : argument is not numeric or logical: returning NA

data$Day.1

is not numeric or logical so it is probably character or date.

look at str(data)

Regards
Petr


> 
> Thanking you in advance.
> Deepak
> 
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list