Closed jonathon-love closed 9 years ago
OK, I'll prevent people from trying a t test with one observation...(sigh)
Is it possible for these to be made consistent? We examine the error strings, so it makes it easier on us.
> a <- data.frame(f=c(1,1), g=c(1,2))
> ttestBF(formula=f~g, data=a)
Error in t.test.default(x = 1, y = 1, var.eq = TRUE) :
not enough observations
> a <- data.frame(f=c(2,1,3), g=c(1,1,2))
> ttestBF(formula=f~g, data=a)
Error in ttest.tstat(t = t, n1 = ns[1], n2 = ns[2], nullInterval = nullInterval, :
Insufficient sample size for t analysis.
Hmm, one is the result of an error in an R function, and the other is my error. But I can just copy the R function error string. Is that what you want?
[Edit: I did it and committed the changes as 28258cbf825f987cb1dc3ad2cf06b3eb706b883a]