title: Adding row to a data frame with missing values
body: <p>So I have this data frame</p>
  
  <pre><code>df &lt;- data.frame( A=1:10, B=LETTERS[1:10], C=letters[1:10], stringsAsFactors= F )
  </code></pre>
  
  <p>I want to add a row to this data frame with A=11 and C="K", but I don't have the information on the column C. In fact, I have no idea a priori what other columns are there in the data frame, except for A and B. These missing columns should get an NA. The best I could come up is this:</p>
  
  <pre><code>tmp &lt;- rep( NA, ncol( df ) ) # Batman!
  df &lt;- rbind( df, tmp )
  df[ nrow( df ), "A" ] &lt;- 11
  df[ nrow( df ), "B" ] &lt;- "K"
  </code></pre>
  
  <p>Is there a simpler way?</p>