title: How to find max from dynamic number of columns
body: <p>I have two dataframes:
  A: 20*15 matrix of numbers 
  B: 20*1 list of numbers (from 1-15). </p>
  
  <p>I would like to find the max number on each row in table A, however only looking at the columns from table B</p>
  
  <p>Simplified example below.</p>
  
  <p>Thanks!</p>
  
  <pre><code>+-----------------+
  |       A:        |
  +-----------------+
  | 7  3  5  4      |
  | 8  1  2  5      |
  | 2  3  7  2      |
  | 4  1  3  6      |
  
  
  +-----------------+
  |       B:        |
  +-----------------+
  | 2               |
  | 4               |
  | 1               |
  | 2               |
  </code></pre>
  
  <hr>
  
  <pre><code>| Desired result: |
  | 7               |
  | 8               |
  | 2               |
  | 4               |
  </code></pre>