title: Extract p-value from anova() from comparison of two linear models in R
body: <p>My apologies for not including enough information to properly access the issue.  Anyway,I want to compare different pairs of linear models and record their p-values into a table.  Where my troubles lie is that I cannot extract only the p-value.</p>
  
  <pre><code>TC &lt;- matrix(data=NA, nrow=1, ncol=6)
      ML5 &lt;- 1:5
  for(B in ML5) {
      Coop &lt;- anova(M6,Models5[[B]])$"Pr(&gt;F)"
      TC[1,B] &lt;- Coop
  }
  
   &gt;Coop
     NA 2.041767e-05
  </code></pre>
  
  <p>So how do I only put the number into the table and not the NA into the table?</p>
  
  <p>Thanks a million!</p>