title: how to write multiple dataframe to a single csv file in a loop in R?
body: <p>I would like to write a multiple dataframe "neighbours_dataframe" in a single CSV file :</p>
  
  <p>I use this line to write the multiple dataframe to multiple file :</p>
  
  <pre><code>for(i in 1:vcount(karate)){
  write.csv(neighbours_dataframe[[i]], file = as.character(V(karate3)$name[i]),row.names=FALSE)}
  </code></pre>
  
  <p>if I use this code:</p>
  
  <pre><code>for(i in 1:vcount(karate)){
  write.csv(neighbours_dataframe[[i]], file = "karate3.csv",row.names=FALSE)}
  </code></pre>
  
  <p>this would give me just the last dataframe in the csv file  :</p>
  
  <p>I was wondering , How could I have a single CSV file which have all the dataframe in the way that the column header of the first dataframe just written to the csv file and all other data frame copied in a consecutive manner ?</p>
  
  <p>thank you in advance</p>