title: Storing loop output in a dataframe in R
body: <p>I want to know how to store the values of the complete loop output into a single dataframe in R. For example,</p>
  
  <pre><code>for(i in unique(x$id)){
      .
      .
      .
      y=output of one iteration}
  </code></pre>
  
  <p>At the end of each iteration, I am getting the output in y. But I want to store output of all iterations into y. How do I do that in R?</p>