title: Updating the CSV file after export using R
body: <p>I need to update the CSV file after exporting through R.I have managed to export the dataset into a CSV file but I want to retain the existing observations and append the new ones without replacing the CSV file.
  Below is the code snippet which has a final dataset called "result" and it is replaced every time the query runs. -</p>
  
  <pre><code>  result &lt;- sqldf(query)
  
    if (!file.exists("final_table.csv"))        
    load(file="final_table.csv")
    write.csv(result, file = 'final_table.csv')
  </code></pre>
  
  <p>Every time the dataset "result" gets updated, I see a new CSV (final_table) every time I.All I want is one single CSV file that gets updated and the observations are appended.Please suggest me if its possible.</p>