title: Trouble plotting predict line in R
body: <p>I have a simple data set with two columns of data- <code>K</code> and <code>SwStr</code>.</p>
  
  <pre><code>K = c(.259, .215, .224, .223, .262, .233)
  SwStr = c(.130, .117, .117, .114, .113, .111)
  </code></pre>
  
  <p>I plotted the data using:</p>
  
  <pre><code>plot(res$K, res$SwStr)
  </code></pre>
  
  <p>I want to plot the result of a linear model, using <code>SwStr</code> to predict <code>K</code>. I try to do that using:</p>
  
  <pre><code>graphic&lt;-lm(K~SwStr-1, data=res)
  P=predict(graphic)
  
  plot(res$K, res$SwStr)
  lines(P, lty="dashed", col="green", lwd=3)
  </code></pre>
  
  <p>But when I do this, I don't get any line plotted. What am I doing wrong?</p>