title: R define dimensions of empty data frame
body: <p>I am trying to collect some data from multiple subsets of a data set and need to create a data frame to collect the results.  My problem is don't know how to create an empty data frame with defined number of columns without actually having data to put into it.</p>
  
  <pre><code>collect1 &lt;- c()  ## i'd like to create empty df w/ 3 columns: `id`, `max1` and `min1`
  
  for(i in 1:10){
  collect1$id &lt;- i
  ss1 &lt;- subset(df1, df1$id == i)
  collect1$max1 &lt;- max(ss1$value)
  collect1$min1 &lt;- min(ss1$value)
  }
  </code></pre>
  
  <p>I feel very dumb asking this question (I almost feel like I've asked it on SO before but can't find it) but would greatly appreciate any help.</p>