title: In R, Is there a quick way to select, from a list, all numbers not in another list aside from using a for loop?
body: <p>I have a dataframe df_new that is a subset of a dataframe df_original, hence its ids are not sequential and are partial.</p>
  
  <p>If I extract the IDs of this dataframe df_new, I get something like</p>
  
  <pre><code>8    9   23   24   25   26   27   28   29   30   34   35   39   40 2997   55   56   58  617  640   95   96 
  </code></pre>
  
  <p>How do I extract the numbers that are not in df_new, but in the original sequential ids from 1 to nrow(df_original) -- and hence the rows that are not in df_new but in df_original</p>
  
  <p>Of course, I can create a for loop that checks if the numbers are in df_new$id, but I think in R there'd be a more elegant way to do this.</p>