title: Using another data table to condition on columns in a primary data table r
body: <p>Suppose I have two data tables, and I want to use the second one, which contains a row with some column values, to condition the first one.</p>
  
  <p>Specifically, I want to use d2 to select rows where its variables are less than or equal to the values. </p>
  
  <pre><code> d1 = data.table('d'=1,'v1'=1:10, 'v2'=1:10)
   d2 = data.table('v1'=5, 'v2'=5)
  </code></pre>
  
  <p>So I would want the output to be </p>
  
  <pre><code>   d v1 v2
  1: 1  1  1
  2: 1  2  2
  3: 1  3  3
  4: 1  4  4
  5: 1  5  5
  </code></pre>
  
  <p>But I want to do this without referencing specific names unless it's in a very general way, e.g. <code>names(d2)</code>.           </p>