{"action":"opened","issue":{"url":"https://api.github.com/repos/abhisheknigam04/R-challenges/issues/1","labels_url":"https://api.github.com/repos/abhisheknigam04/R-challenges/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/abhisheknigam04/R-challenges/issues/1/comments","events_url":"https://api.github.com/repos/abhisheknigam04/R-challenges/issues/1/events","html_url":"https://github.com/abhisheknigam04/R-challenges/issues/1","id":66143043,"number":1,"title":"Updating the CSV file after export using R","user":{"login":"abhisheknigam04","id":11747466,"avatar_url":"https://avatars.githubusercontent.com/u/11747466?v=3","gravatar_id":"","url":"https://api.github.com/users/abhisheknigam04","html_url":"https://github.com/abhisheknigam04","followers_url":"https://api.github.com/users/abhisheknigam04/followers","following_url":"https://api.github.com/users/abhisheknigam04/following{/other_user}","gists_url":"https://api.github.com/users/abhisheknigam04/gists{/gist_id}","starred_url":"https://api.github.com/users/abhisheknigam04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhisheknigam04/subscriptions","organizations_url":"https://api.github.com/users/abhisheknigam04/orgs","repos_url":"https://api.github.com/users/abhisheknigam04/repos","events_url":"https://api.github.com/users/abhisheknigam04/events{/privacy}","received_events_url":"https://api.github.com/users/abhisheknigam04/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-03T13:05:18Z","updated_at":"2015-04-03T13:05:18Z","closed_at":null,"body":"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. -\r\n  result <- sqldf(query)\r\n\r\n  if (!file.exists(\"final_table.csv\"))        \r\n  load(file=\"final_table.csv\")\r\n  write.csv(result, file = 'final_table.csv')\r\n\r\nEvery 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."}}