title: Multiplication of several columns
body: <p>I want to multiply some counts in specific locations (0-100, 0-12 etc.., individual variable columns) by the number of days a count is present (days) </p>
  
  <p>Here is an example of my data:</p>
  
  <pre><code>df &lt;- structure(list(month = c("Apr", "Apr", "Aug", "Aug", "Aug", "Sep"
  ), Year = c(2018, 2018, 2018, 2018, 2018, 2018), First = 
   structure(c(17995, 
   17998, 17750, 17758, 17770, 17778), class = "Date"), Last = 
   structure(c(17999, 
   17998, 17750, 17761, 17771, 17778), class = "Date"), days = c(5, 
   1, 1, 4, 2, 1), `0-100` = c(1, 0, 1, 1, 1, 1), `0-12` = c(0, 
   0, 1, 1, 1, 1), `0-25` = c(1, 1, 1, 1, 1, 1), `0-50` = c(1, 0, 
  1, 1, 1, 1)), row.names = c(NA, -6L), class = c("tbl_df", "tbl", 
   "data.frame"))
  </code></pre>
  
  <p>So i was thinking something along the lines of: </p>
  
  <pre><code>df2 &lt;- df %&gt;%
    mutate("0-100b" = days * "0-100", "0-12b" = days * "0-12", "0-25b" = days * "0-25", "0-50b" = days * "0-25")
  </code></pre>
  
  <p>Which one doesn't seem to work, but two there must be a more concise way than writing out each multiplication too ... if i had many more columns this seems a little tedious.</p>
  
  <p>ok edit for col names:</p>
  
  <pre><code>colnames(df) &lt;- c("month", "Year", "First", "Last" , "days", "V", "I", 
  "II", "III")
  
  df2 &lt;- df %&gt;%
  mutate(Vb = days * V, Ib = days * I, IIb = days * 
         II, IIIb = days * III)
  </code></pre>