title: Extract id with certain condition to a list or vector
body: <p>Suppose I have a data frame <code>z</code></p>
  
  <pre><code>id num
   1   5
   2   6
   3   7
  </code></pre>
  
  <p>and I want the list of <code>id</code> whose <code>num</code> is greater than <code>5</code>, in this case</p>
  
  <pre><code>c(6, 7)
  </code></pre>
  
  <p>I tried <code>x&lt;-z[z$num&gt;5,id]</code> but got a error message:</p>
  
  <pre><code>$ operator is invalid for atomic vectors
  </code></pre>
  
  <p>Any suggestion?
  Thanks!</p>