title: Draw qualified sample from dataframe
body: <p>I'd like to draw a random sample of rows from a dataframe; however, not all rows should be included in the draw, just those fulfilling a negative condition: that they do not match a certain variable in a second dataframe.
  Here's some mock data:</p>
  
  <pre><code> df1 &lt;- data.frame(
    x = c("A", "B", "L", "G", "C", "F", "S", "J", "G", "K", "X", "Y", "B", "C", "Z")
  )
  
  df2 &lt;- data.frame(
    a = LETTERS[1:5],
    b = 1:5
  )
  </code></pre>
  
  <p>The dataframe I wish to draw the sample from is df1. The draw should exclude those data points in df1$x that match the data points in the first column of <code>df2</code>, which is <code>df2$a</code>. So far I've tried this:</p>
  
  <pre><code>df1[sample(1:nrow(df2[-(match(df1$x, df2$a))]), 7, replace = F), ]
  </code></pre>
  
  <p>which gives an error message; and I've tried this:</p>
  
  <pre><code>df1[sample(1:nrow(df2[!match(df1$x, df2$a),]), 7, replace = F), ]
  </code></pre>
  
  <p>which does not give an error but does contain unwanted data. Any solutions?</p>