title: R: Break for loop
body: <p>Can you confirm if the next break cancels the inner for loop? </p>
  
  <pre><code>   for (out in 1:n_old){
  
       id_velho &lt;- old_table_df$id[out]
        for (in in 1:n)
        {
         id_novo &lt;- new_table_df$ID[in]
         if(id_velho==id_novo)
         {
          break
         }else 
         if(in == n)
         {
         sold_df &lt;- rbind(sold_df,old_table_df[out,])
         }
        }
      }
  </code></pre>