title: How to add rows to empty data frames with header in R?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5231540/r-losing-column-names-when-adding-rows-to-an-empty-data-frame">R: losing column names when adding rows to an empty data frame</a>  </p>
  </blockquote>
  
  
  
  <p>I created an empty dataframe with column names only as follows</p>
  
  <pre><code>&gt; compData &lt;- data.frame(A= numeric(0), B= numeric(0))
  &gt; compData
  [1] A B
  &lt;0 rows&gt; (or 0-length row.names)
  &gt; compData &lt;- rbind(compData,c(5,443))
  &gt; compData
    X5 X443
  1  5  443
  </code></pre>
  
  <p>in the above after adding one row the column names are changed. How can I add new row data to data-frame?</p>