title: Select column based on row values
body: <p>I would like to subset columns in a data frame in R based in the first row number into 2 dataframes (<code>a</code> and <code>b</code>)</p>
  
  <p>My input <code>dat</code>:</p>
  
  <pre><code>    NE001457   NE001458   NE001494   NE001532   NE001533   NE001542
          1          0          1          1          1          1
   0.22951556  0.39403959  0.11835655  0.40844591 0.28442078 0.24236144
   0.04566349  0.14491037  0.03184582  0.0819644  0.18298301 -0.0339111
   0.04543686  0.05876655  0.23562874 -0.0717529 -0.0320517  -0.0851137
  </code></pre>
  
  <p>My expected output <code>a</code>:</p>
  
  <pre><code>     NE001457     NE001494   NE001532   NE001533   NE001542
          1             1          1          1          1
    0.22951556    0.11835655  0.40844591 0.28442078 0.24236144
    0.04566349    0.03184582  0.0819644  0.18298301 -0.0339111
    0.04543686   0.23562874  -0.0717529 -0.0320517  -0.0851137
  </code></pre>
  
  <p>My expected output <code>b</code>:</p>
  
  <pre><code>   NE001494 
         0          
    0.39403959  
    0.14491037  
    0.05876655  
  </code></pre>
  
  <p>I already have tried some thing like that <code>a &lt;- subset(dat, dat[1,] == 1)</code> and <code>b &lt;- subset(dat, dat[1,] == 0)</code> but not works.</p>
  
  <p>Some ideas?</p>
  
  <p>Cheers!</p>