title: How to obtain just particular lines of summary on lm object
body: <p>This problem comes from easier problem which I managed to solve myself. So here is my original question.</p>
  
  <p>In my data I have lots of categories, but i'm not interested in estimating coefficients for all of them, I just want to test the hypothesis, that there is no difference in categories. And calling <code>summary</code> on my object produces most information that I don't need for my report.</p>
  
  <pre><code>set.seed(42)
  dat &lt;- data.frame(cat=factor(sample(1:10, 100, replace=T)), y=rnorm(100))
  l1 &lt;- lm(y~cat-1, data=dat)
  summary(l1)
  </code></pre>
  
  <p>How do I extract only the last line from call to <code>summary(l1)</code>?</p>
  
  <p>In this particular case I can just used <code>anova</code> function</p>
  
  <pre><code>anova(l1)
  </code></pre>
  
  <p>and got only the info that I needed, just in different formatting than <code>summary(l1)</code> produces.</p>
  
  <p>What if I have some kind of a summary on an object and I want to extract just particular part of <code>summary(object)</code> how do I do that? For example, how do I get <code>R</code> to print only the line of call <code>summary(l1)</code>?</p>
  
  <p>p.s. I am aware of <code>summary(l1)$fstatistic</code>.</p>