title: Simplifying R Code: dlpylr mutate, multiplication of certain columns based on values in a separate data frame
body: <p>I have been trying to do a multiplication within a mutate, using values in a different data.frame (which has only one row which contains the values), and multiply entire columns with the same column names. I managed to make it work but this was the only way I could do it, and it looks very messy. I was wondering if someone could help me simplify it. (Preferably in a way which would allow me to keep it within a larger dpylr chain). </p>
  
  <pre><code>prioritydata &lt;- data[, -(3:16)] %&gt;%
                  mutate(Q1 = as.numeric(Q1) * as.numeric(questionweighting$Q1),
                         Q2 = as.numeric(Q2) * as.numeric(questionweighting$Q2), 
                         Q3 = as.numeric(Q3) * as.numeric(questionweighting$Q3), 
                         Q4 = as.numeric(Q4) * as.numeric(questionweighting$Q4), 
                         Q5 = as.numeric(Q5) * as.numeric(questionweighting$Q5), 
                         Q6 = as.numeric(Q6) * as.numeric(questionweighting$Q6), 
                         Q7 = as.numeric(Q7) * as.numeric(questionweighting$Q7), 
                         Q8 = as.numeric(Q8) * as.numeric(questionweighting$Q8),
                         Q9 = as.numeric(Q9) * as.numeric(questionweighting$Q9), 
                         Q10 = as.numeric(Q10) * as.numeric(questionweighting$Q10),
                         Q11 = as.numeric(Q11) * as.numeric(questionweighting$Q11), 
                         Q12 = as.numeric(Q12) * as.numeric(questionweighting$Q12))
  </code></pre>
  
  <p>Thanks in advance.</p>