title: Weird result with plot option type="b". Why does this happen?
body: <p>The following works, giving 3 points connected with a line.</p>
  
  <pre><code>plot(c(1,7,12), c(0,0,2),type="b")
  </code></pre>
  
  <p>However this does not work (it plots the points but without connecting line and without any warning or error)</p>
  
  <pre><code>t&lt;-data.frame(x=1:20,y=c(0,NA, NA, NA, NA, NA,  0, NA, NA, NA, NA,  2, NA, NA, NA, NA, NA, NA, NA, NA))
  plot(t$x, t$y,type="b")
  </code></pre>
  
  <p>Why is that? Is it because of the <code>NA</code> in the data frame? I can't seem to find any reference on this.</p>