title: Adding multiple columns to a data frame
body: <p>I have a data frame <code>df</code> such as:  </p>
  
  <pre><code>df &lt;- data.frame(a=1:5, b=101:105)
  </code></pre>
  
  <p>Now adding a single column to a specific row works:</p>
  
  <pre><code>df[4,"d"] &lt;- 5
  df
  #   a   b  d
  # 1 1 101 NA
  # 2 2 102 NA
  # 3 3 103 NA
  # 4 4 104  5
  # 5 5 105 NA
  </code></pre>
  
  <p>But adding multiple columns simultaneously doesn't!</p>
  
  <pre><code>df[3,c("b","f","g")] &lt;- c(6,7,8)
  #Error in `*tmp*`[[j]] : recursive indexing failed at level 2
  </code></pre>
  
  <p>What gives?</p>
  
  <p>The long way to achieve this, of course, is:</p>
  
  <pre><code>df[3,"b"] &lt;- 6
  df[3,"f"] &lt;- 7
  df[3,"g"] &lt;- 8
  </code></pre>
  
  <p>But is this really the easiest (and the right) way?</p>