title: GGPlot2 Error: Warning message: no loop for break/next, jumping to top level
body: <p>Trying to make a visualization of map representing all the flight routes. And the loop does not run and I get the error listed in the title.
  When I run the codes individually I do get one flight route however when I run the entire code it never outputs anything and runs forever basically.</p>
  <p>The data is from the openflights.com! I will not be able to replicate it here but I could give a few example lines of data if necessary!
  <a href="https://i.stack.imgur.com/KZljZ.png" rel="nofollow noreferrer">Initial visualizaiton</a></p>
  <pre><code>for(i in 1:nrow(unique(direct_flights))){
      node1 &lt;- airports[airports$AirportID==direct_flights$SourceAirportID[i],]
      node2 &lt;- airports[airports$AirportID==direct_flights$`Desination AirportID`[i],]
      Nodes_together&lt;-cbind(node1,node2)
      colnames(Nodes_together)&lt;-c(&quot;Start_AirportID&quot;,&quot;lat.x&quot;,&quot;lon.x&quot;,&quot;Dest_AirportID&quot;,&quot;lat.y&quot;,&quot;lon.y&quot;)
      worldmap &lt;- borders(&quot;world&quot;, colour=&quot;#efede1&quot;, fill=&quot;blue&quot;) # create a layer of borders
  map_overall &lt;- ggplot() + worldmap +
    geom_curve(data=Nodes_together, aes(x = lon.x, y = lat.x, xend = lon.y, yend = lat.y), col = &quot;red&quot;, size = 1, curvature = .2) 
    map_overall
  }
  </code></pre>
  <p>This is the traceback error I get: &quot;no loop for break/next, jumping to top level&quot;</p>
  <p>6.exists(name, envir = x, inherits = FALSE)</p>
  <ol start="5">
  <li>fetch_ggproto(x, name)</li>
  </ol>
  <p>4.<code>$.ggproto</code>(geom, &quot;parameters&quot;)</p>
  <p>3.geom$parameters</p>
  <p>2.layer(data = data, mapping = mapping, stat = stat, geom = GeomCurve, position = position, show.legend = show.legend, inherit.aes = inherit.aes, params = list(arrow = arrow, arrow.fill = arrow.fill, curvature = curvature, angle = angle, ncp = ncp, lineend = lineend, na.rm = na.rm, ...</p>
  <p>1.geom_curve(data = Nodes_together, aes(x = lon.x, y = lat.x, xend = lon.y, yend = lat.y), col = &quot;red&quot;, size = 1, curvature = 0.2)</p>