title: Drawing a line on time series plot
body: <p>
  I have the next time series object, which I plot it using plot: </p>
  
  <pre><code>ts &lt;- ts(c(1:4,2:5,3:6,4:7,5:8,6:9,7:10), frequency = 4)
  plot(ts)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/HJmvb.png" rel="nofollow noreferrer">Plot of the ts</a></p>
  
  <p>Now, I would like to draw a line between the first and the last observation using abline, but, although R doesn't show any error, it seems that it doesn't work when using it on a plot of time series. The code used to try to draw the line was:</p>
  
  <pre><code>abline(a = 1, b = (ts[length(ts)]- ts[1]) / (length(ts)-1))
  </code></pre>
  
  <p>Did anyone had the same problem and manage to solve it? </p>
  
  <p><a href="https://i.stack.imgur.com/HJmvb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HJmvb.png" alt="enter image description here"></a></p>