Dear R Helpers, I am stuck on some syntax and I thought that I was following one of the examples that I found out there quite faithfully.
I just want to know how to do a t test on a single mean for whether or not it is greater than a specific value. So I am using the data set sleep and I want to know if the mean of extra is greater then zero. I was under the impression that the syntax is t.test(sleep$extra,mu=0,"greater") but I get the error message Error in t.test.default(sleep$extra, mu = 0, "greater") : not enough 'y' observations I have tried this on a few other data sets that have more then 20 observations and I get the same error. I looked in the documentation but the examples are for the comparison of two groups, not a single group mean. Any help would be most appreciated. --John J. Sparks, Ph.D. ______________________________________________ R-help@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.