title: R::How to take the p-value from chisq.test output
body: <p>I am doing a chisq.test and trying to assign the output to a variable.</p>
  
  <pre><code>&gt; Output &lt;- chisq.test(test[,k], test[,l])
  
  &gt; Output
  
          Pearson's Chi-squared test
  
  data:  test[, k] and test[, l]
  X-squared = 7128, df = 36, p-value &lt; 2.2e-16
  </code></pre>
  
  <p>I want to access the p-value alone from the output or assign p-value alone to the ouptut.</p>
  
  <p>Is there a way like:</p>
  
  <pre><code>Output$p-value 
  </code></pre>
  
  <p>using which i can access the p-value alone? I dont want the rest of the information like df, X-squared values in the output.</p>