title: Is there a way to get dplyr's bind_cols to expand number of rows like in cbind?
body: <p>From <code>?dplyr::bind_cols</code>:</p>
  
  <blockquote>
    <p>This is an efficient implementation of the common pattern of do.call(rbind, dfs) or do.call(cbind, dfs) for binding many data frames into one</p>
  </blockquote>
  
  <p>However, with example data:</p>
  
  <pre><code>tmp_df1 &lt;- data.frame(a = 1)
  tmp_df2 &lt;- data.frame(b = c(-2, 2))
  tmp_df3 &lt;- data.frame(c = runif(10))
  </code></pre>
  
  <p>The command <code>do.call(cbind, list(tmp_df1, tmp_df2, tmp_df3))</code> produces:</p>
  
  <pre><code>   a  b         c
  1  1 -2 0.8473307
  2  1  2 0.8031552
  3  1 -2 0.3057430
  4  1  2 0.6344999
  5  1 -2 0.7870753
  6  1  2 0.9453199
  7  1 -2 0.6642231
  8  1  2 0.9708049
  9  1 -2 0.7189576
  10 1  2 0.9217087
  </code></pre>
  
  <p>That is, rows of <code>tmp_df1</code> and <code>tmp_df2</code> are recycled to match the number of rows in <code>tmp_df3</code>.</p>
  
  <p>In <code>dplyr</code>:</p>
  
  <pre><code>&gt; bind_cols(tmp_df1, tmp_df2, tmp_df3)
  Error in eval(substitute(expr), envir, enclos) : 
    incompatible number of rows (2, expecting 1)
  </code></pre>
  
  <p>The reason why I want to do something like this is because I am in a situation similar to below:</p>
  
  <pre><code>df_normal_param &lt;- df(mu = rnorm(10), sigma = runif(10))
  
  df_normal_sample_list &lt;- lapply(1:10, function(i) 
                           with(df_normal_param, 
                                data.frame(sam = rnorm(100, mu[i], sigma[i]))
  </code></pre>
  
  <p>and I wish to attach the arguments used to create each entry of <code>df_normal_sample_list</code> to the outputs, e.g.</p>
  
  <pre><code>df_normal_sample_list &lt;- lapply(1:10, function(i) 
                           cbind(df_normal_param[i,], df_normal_sample_list[[i]]))
  </code></pre>