title: dplyr::mutate to add multiple values
body: <p>There are a couple of issues about this on the <a href="https://github.com/hadley/dplyr" rel="noreferrer">dplyr Github repo</a> already, and at least one related SO question, but none of them quite covers my question -- I think.</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/24936330/adding-multiple-columns-in-a-dplyr-mutate-call">Adding multiple columns in a dplyr mutate call</a> is more or less what I want, but there's a special-case answer for that case (<code>tidyr::separate</code>) that doesn't (I think) work for me.</li>
  <li><a href="https://github.com/hadley/dplyr/issues/372" rel="noreferrer">This issue</a> ("summarise or mutate with functions returning multiple values/columns") says "use <code>do()</code>".</li>
  </ul>
  
  <p>Here's my use case: I want to compute exact binomial confidence intervals </p>
  
  <pre><code>dd &lt;- data.frame(x=c(3,4),n=c(10,11))
  get_binCI &lt;- function(x,n) {
      rbind(setNames(c(binom.test(x,n)$conf.int),c("lwr","upr")))
  }
  with(dd[1,],get_binCI(x,n))
  ##             lwr       upr
  ## [1,] 0.06673951 0.6524529
  </code></pre>
  
  <p>I can get this done with <code>do()</code> but I wonder if there's a more expressive way to do this (it feels like <code>mutate()</code> <em>could</em> have a <code>.n</code> argument <a href="https://github.com/hadley/dplyr/issues/154" rel="noreferrer">as is being discussed for summarise()</a> ...)</p>
  
  <pre><code>library("dplyr")
  dd %&gt;% group_by(x,n) %&gt;%
      do(cbind(.,get_binCI(.$x,.$n)))
  
  ## Source: local data frame [2 x 4]
  ## Groups: x, n
  ## 
  ##   x  n        lwr       upr
  ## 1 3 10 0.06673951 0.6524529
  ## 2 4 11 0.10926344 0.6920953
  </code></pre>