[R] a new-bie question about obtaining certain value from the print out
kurtzhao at yeah.net
Wed Aug 29 22:53:04 CEST 2007
I am quite new to R.
my command is
t.test(c(1:5,7:11), y=c(1:10),alternative = c("two.sided"), paired = TRUE)
The output is
data: c(1:5, 7:11) and c(1:10)
t = 3, df = 9, p-value = 0.01496
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
mean of the differences
According to the reference:
A list with class "htest" containing the following components:
p.value the p-value for the test.
How can I get only the p.value as the output instead of the whole print out?
Thanks a lot!
More information about the R-help