title: scale/normalize columns by group
body: <p>I have a data frame that looks like this:</p>
  <pre><code>  Store Temperature Unemployment Sum_Sales
  1     1       42.31        8.106   1643691
  2     1       38.51        8.106   1641957
  3     1       39.93        8.106   1611968
  4     1       46.63        8.106   1409728
  5     1       46.50        8.106   1554807
  6     1       57.79        8.106   1439542
  </code></pre>
  <p>For each 'Store', I want to normalize/scale two columns (&quot;Sum_sales&quot; and &quot;Temperature&quot;).</p>
  <p>Desired output:</p>
  <pre><code>  Store Temperature Unemployment Sum_Sales
  1     1       1.000        8.106   1.00000
  2     1       0.000        8.106   0.94533
  3     1       0.374        8.106   0.00000
  4     2       0.012        8.106   0.00000
  5     2       0.000        8.106   1.00000
  6     2       1.000        8.106   0.20550
  </code></pre>
  <p>Here is the normalizing function that I created:</p>
  <pre><code> normalit&lt;-function(m){
     (m - min(m))/(max(m)-min(m))
   }
  </code></pre>
  <p>What I have tried:</p>
  <pre><code>df2 &lt;- df %.%
    group_by('Store') %.%
    summarise(Temperature = normalit(Temperature), Sum_Sales = normalit(Sum_Sales)))
  </code></pre>
  <p>Any suggestions/help would be greatly appreciated.  Thanks.</p>