title: How can I simultaneously assign value to multiple new columns with R and dplyr?
body: <p>Given</p>
  
  <pre><code>base &lt;- data.frame( a = 1) 
  f &lt;- function() c(2,3,4)
  </code></pre>
  
  <p>I am looking for a solution that would result in a function <code>f</code> being applied to each row of <code>base</code> data frame and the result would be appended to each row. Neither of the following works:</p>
  
  <pre><code>result &lt;- base %&gt;% rowwise() %&gt;% mutate( c(b,c,d) = f() )
  result &lt;- base %&gt;% rowwise() %&gt;% mutate( (b,c,d) = f() )
  result &lt;- base %&gt;% rowwise() %&gt;% mutate( b,c,d = f() )
  </code></pre>
  
  <p>What is the correct syntax for this task?</p>
  
  <p>This appears to be a similar problem (<a href="https://stackoverflow.com/questions/7519790/assign-multiple-new-variables-on-lhs-in-a-single-line-in-r">Assign multiple new variables on LHS in a single line in R</a>) but I am specifically interested in solving this with functions from tidyverse.</p>