title: R Generating values based on comparison of previous columns
body: <p>I'm hoping to generate a column (Min) that finds the minimum of selected name columns and extract the name of the column as its value. Following is the sample dataframe:</p>
  
  <pre><code>          Amy  Abe  Donna  Racheal  Mike     Min       u
            5    34    54     56       23      Amy       0
            43   11    3      33       21      Donna     1
            54   32    21     54       1       Mike      1 
            21   5     43     32       21      Abe       1
            32   21    23     5        32      Racheal   0
            43   2     2      13       45      Abe Donna 1
                              .
                              .
                              .
  </code></pre>
  
  <p>Column u is just a column that is at the end of the dataset. The dataset is rather large therefore I'm trying to find an efficient method to generate column Min. </p>
  
  <p>The code I have on mind:</p>
  
  <pre><code>     MinData &lt;- Data %&gt;% mutate(Min = 
       min(colnames(Data)[1:5]))
  </code></pre>
  
  <p>This only extracts name of the columns. What should I add to enable the column to compare values in each row and select the column name with the minimum value?</p>