title: Subset columns of one data frame (by name) by information from second data frame
body: <p>I would appreciate a solution for the following problem: I have the following example data frame:<br></p>
  
  <pre><code>df1 = data_frame(Tom = c(1,2,3,4), Tina = c(5,6,7,8), Todd = c(9,10,11,12), Brit = c(1,2,3,4))
  </code></pre>
  
  <p>I have a second data frame with information about Tom, Tina etc.<br></p>
  
  <pre><code> df2 = data_frame(ID = c("Tom","Todd","Tina","Brit"), value = c(1,3,2,1))
  </code></pre>
  
  <p>Now I would like to subset colums from data frame df1 if the "value" in df2 fulfils a particular condition, e.g. df2$value = 1 | df2$value = 2 
  The resulting table should look like: <br></p>
  
  <pre><code>desired_result_look_like = data_frame(Tom = c(1,2,3,4), Tina = c(5,6,7,8), Brit = c(1,2,3,4))
  </code></pre>
  
  <p>Thanks for you help.</p>