data("CO2")
t.test(CO2$uptake,mu = 30,alternative = "l")
##
## One Sample t-test
##
## data: CO2$uptake
## t = -2.3619, df = 83, p-value = 0.01026
## alternative hypothesis: true mean is less than 30
## 95 percent confidence interval:
## -Inf 29.17585
## sample estimates:
## mean of x
## 27.2131
One Sample t-test
data: CO2$uptake t = -2.3619, df = 83, p-value = 0.01026 alternative hypothesis: true mean is less than 30 95 percent confidence interval: -Inf 29.17585 sample estimates: mean of x 27.2131
data("Indometh")
t.test(Indometh$conc,mu = 0.3,alternative = "g")
##
## One Sample t-test
##
## data: Indometh$conc
## t = 3.7477, df = 65, p-value = 0.0001908
## alternative hypothesis: true mean is greater than 0.3
## 95 percent confidence interval:
## 0.4618886 Inf
## sample estimates:
## mean of x
## 0.5918182
One Sample t-test
data: Indometh$conc t = 3.7477, df = 65, p-value = 0.0001908 alternative hypothesis: true mean is greater than 0.3 95 percent confidence interval: 0.4618886 Inf sample estimates: mean of x 0.5918182