title: What is difference between dataframe and list in R?
body: <p>What is difference between <strong>dataframe</strong> and <strong>list</strong> in <code>R</code>? Which one should be used when? Which is easier to loop over?</p>
  
  <p><strong>Exact problem:</strong> I have to first store 3 string elements like "a", "b", "c". Later for each of these, I need to append 3 more elements; for instance for "a" I have to add "a1", "a2", "a3". Later I have to use nested for loops to access these elements. </p>
  
  <p>So I am confused to use dataframe or list or some other data type, in which I could first store and then append (kind of each column)? </p>
  
  <p>Currently I am getting errors, like "number of items to replace is not a multiple of replacement length"</p>