title: Subset columns if they meet a condition
body: <p>My task: </p>
  
  <ul>
  <li>Select all columns where rows are either 0 or 1.  </li>
  <li>Change the class all of these columns to factorial (as they are binary).</li>
  </ul>
  
  <p>In the below case, CA + CC should change to <code>factorial</code>.</p>
  
  <pre><code>CA = c(1,0,1,0,1)
  CB = c(1,12,21,0,7)
  CC = c(1,0,1,0,1)
  mydf = data.frame(CA, CB, CC)
  str(mydf)
      'data.frame':   5 obs. of  3 variables:
       $ CA: num  1 0 1 0 1
       $ CB: num  1 12 21 0 7
       $ CC: num  1 0 1 0 1
  </code></pre>
  
  <p>Why? Because these rows are currently depicted as <code>integer</code> and <code>number</code> instead of <code>factors</code>. And I assume that some ML-algorithms mix things up.</p>