title: select() transformed/new variables inside one mutate()
body: <p>Consider a df like this:</p>
  
  <pre><code>   colA colB colC colD
  1     1   50  100    a
  2     2   51  101    b
  3     3   52  102    c
  4     4   53  103    d
  5     5   54  104    e
  6     6   55  105    f
  7     7   56  106    g
  8     8   57  107    h
  9     9   58  108    i
  10   10   59  109    j
  </code></pre>
  
  <p>I want to transform the variable "colA" and then calculate a row sum of variables which I choose by <code>select()</code> inside <code>mutate()</code>. I'm doing this:</p>
  
  <pre><code>df %&gt;%
   mutate(colA = colA * 60,
          sum = rowSums(select(., colA, colB, colC)))
  </code></pre>
  
  <p>which gives me an incorrect result:</p>
  
  <pre><code>   colA colB colC colD sum
  1    60   50  100    a 151
  2   120   51  101    b 154
  3   180   52  102    c 157
  4   240   53  103    d 160
  5   300   54  104    e 163
  6   360   55  105    f 166
  7   420   56  106    g 169
  8   480   57  107    h 172
  9   540   58  108    i 175
  10  600   59  109    j 178
  </code></pre>
  
  <p>If I create an entirely new variable:</p>
  
  <pre><code>df %&gt;%
   mutate(colA_mod = colA * 60,
          sum = rowSums(select(., colA_mod, colB, colC)))
  </code></pre>
  
  <p>I get:</p>
  
  <blockquote>
    <p>Error: Evaluation error: Position must be between 0 and n.</p>
  </blockquote>
  
  <p>However, when I use two separate <code>mutate()</code>s, I'm getting the right results:</p>
  
  <pre><code>df %&gt;%
   mutate(colA = colA * 60) %&gt;%
   mutate(sum = rowSums(select(., colA, colB, colC)))
  
     colA colB colC colD sum
  1    60   50  100    a 210
  2   120   51  101    b 272
  3   180   52  102    c 334
  4   240   53  103    d 396
  5   300   54  104    e 458
  6   360   55  105    f 520
  7   420   56  106    g 582
  8   480   57  107    h 644
  9   540   58  108    i 706
  10  600   59  109    j 768
  </code></pre>
  
  <p>So the question is, how I can transform a variable/create a new variable and select it inside one <code>mutate()</code>? </p>
  
  <p><strong>Sample data</strong>:</p>
  
  <pre><code>df &lt;- data.frame(colA = 1:10,
  colB = 50:59,
  colC = 100:109,
  colD = letters[1:10])
  </code></pre>