So lets work through the example from ?t.test()
We do a two-sample t-test on the data by:
t.test(1:10, y = c(7:20))
Now I am only interested in saving the p-value
When I input the followng code, the $p.value
is also saved.
t.test(1:10, y = c(7:20))[3]
I want only the p-value
saved (with the $p.value
) as an numeric/integer/double. Sorry for asking such a simple question