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