title: Combining multiple across() in a single mutate() sentence, while controlling the variables names in R
body: <p>I have the following dataframe:</p>
  <pre><code>df = data.frame(a = 10, b = 20, a_sd = 2, b_sd = 3)
  
     a  b a_sd b_sd
  1 10 20    2    3
  </code></pre>
  <p>I want to compute a/a_sd, b/b_sd, and to add the results to the dataframe, and name them ratio_a, ratio_b. In my dataframe I have a lot of variables so I need a 'wide' solution. I tried:</p>
  <pre><code>df %&gt;% 
    mutate( across(one_of( c('a','b')))/across(ends_with('_sd'))) 
  </code></pre>
  <p>This gave:</p>
  <pre><code>  a        b a_sd b_sd
  1 5 6.666667    2    3
  </code></pre>
  <p>So this worked but the new values took the place of the old ones. How can I add the results to the data frame and to control the new names?</p>