title: Plot and report X intercept from linear regression - R
body: <p>I am using <code>lm</code> in r for linear regression. I would like to plot and report the x intercept.  I know that I could use algebra and solve for x by setting y = 0, but is there a way to have r report it to me? Also, how can I 'tell' r to plot the x intercept?  Would this just entail extending the x axis range to include it?  Thanks.</p>
  
  <pre><code># example r code
  plot(y~x)
  fit &lt;- lm(y~x)
  abline(fit)
  </code></pre>