Hey guys i am trying to do a t-test but it looks like something is wrong ... The data looks like:
pot pair type height
I 1 Cross 23,5
I 1 Self 17,375
I 2 Cross 12
I 2 Self 20,375
I performed the t-test as :
darwin <- read.table("darwin.txt", header=T)
plot(darwin$type, darwin$height, ylab="Height")
darwin.no.outlier = subset(darwin, height>13)
tapply(darwin.no.outlier$height, darwin.no.outlier$type, var)
t.test(darwin$height ~ darwin$type)
the error R gives me is as followed :
Error in
if (stderr < 10 * .Machine$double.eps * max(abs(mx), abs(my))) stop("data are essentially constant") :
missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In mean.default(x) : argument is not numeric or logical: returning NA
2: In var(x) :
Calling var(x) on a factor x is deprecated and will become an error.
Use something like 'all(duplicated(x)[-1L])' to test for a constant vector.
3: In mean.default(y) : argument is not numeric or logical: returning NA
4: In var(y) :
Calling var(x) on a factor x is deprecated and will become an error.
Use something like 'all(duplicated(x)[-1L])' to test for a constant vector.