title: mean and median of residuals from a linear model
body: <p>I just started to learn R and need some help on finding the mean and median of residuals for my data. I calculated the lm and in the summary I get residuals like follows:</p>
  
  <pre><code>min       1Q        median  3Q      Max
  -111.86   -34.90     -7.6   33.46   182.58
  </code></pre>
  
  <p><strong>Question</strong>: so the median of residuals is -7.6 but which is my mean?
  <strong>Or is there a calculation for finding mean and median of residuals?</strong>
  I was going to do mean(resid(trees.lm) or should it be entered as mean(trees.lm$resid)</p>
  
  <p>Please clarify because my classmates all get different responses for the same data set.</p>