title: multiply set of columns by one column in data frame in R
body: <p>I know that I can use mutate across to multiply one columns by other specific columns like this:</p>
  <pre><code>mtcars %&gt;% mutate(across(disp),.*carb)
  </code></pre>
  <p>In my data, both my variables are numeric:</p>
  <pre><code>&gt; str(trad_clean_weighted$Q10_1)
   num [1:1024] NA NA 0 1 NA 0 0 NA 1 1 ...
   - attr(*, &quot;label&quot;)= chr &quot;Q10_1.Dance assessed and reported via report card&quot;
  &gt; str(trad_clean_weighted$wgt_part1B)
   num [1:1024] 9.73 1.9 3.09 3.1 21.42 ...
  </code></pre>
  <p>However, I get this error when I try to multiply the columns:</p>
  <pre><code>my_data %&gt;%
  mutate(across(Q10_1),.*wgt_part1B)
  
  Error: Problem with `mutate()` input `..2`.
  x non-numeric argument to binary operator
  i Input `..2` is `. * wgt_part1B`.
  </code></pre>
  <p>I don't understand why I am getting this error when both variables are numeric! :(</p>
  <p>Any thoughts?</p>