title: How small is a "zero-length arrow"?
body: <p>If you've used the <code>arrows</code> function often enough, you've probably run into this warning:</p>
  <pre><code>set.seed(438520)
  N = 1000
  x = rnorm(N, sd = .1)
  y = rnorm(N)
  
  png('~/Desktop/arrows.png', height = 240, width = 240)
  plot(NA, xlim = c(-1, 1), ylim = c(-3, 3))
  arrows(x[-N], y[-N], x[-1L], y[-1L])
  dev.off()
  </code></pre>
  <blockquote>
  <p>Warning message:
  In arrows(x[-N], y[-N], x[-1L], y[-1L]) :
  zero-length arrow is of indeterminate angle and so skipped</p>
  </blockquote>
  <p><a href="https://i.stack.imgur.com/q4yYe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q4yYe.png" alt="A cluttered plot showing the arrows; the x axis is labeled &quot;Index&quot; and the y axis is labeled &quot;NA&quot;, and the points are in a vertically-oriented ellipse." /></a></p>
  <p>How can we determine which arrow(s) are at fault in order to deal with them as we see fit?</p>